create custom object Values in DevRev
ART-15502_KNOWLEDGE_NODE-5
marketing campaigns on DevRev. This guide goes through the process of creating a \xe2\x80\x9cCampaign\xe2\x80\x9d custom object with relevant fields.\n\nAll DevRev objects require a schema. First, create a schema for the \xe2\x80\x9cCampaign\xe2\x80\x9d custom object. Make sure to replace the `<TOKEN>` with your API token.\n\n### Create custom objects\n\n```\n|  |  |\n| --- | --- |\n| $ | curl --location \'https://api.devrev.ai/schemas.custom.set\' \\ |\n| > | --header \'Content-Type:
Custom objects | DevRev | Docs
ART-15502_KNOWLEDGE_NODE-8
> | "field_type": "enum", |\n| > | "description": "Target audience for the campaign", |\n| > | "allowed_values": [ |\n| > | "Professionals", |\n| > | "Students" |\n| > | ] |\n| > | } |\n| > | ] |\n| > | }\' |\n```\n\nNote that for custom object schemas, `is_custom_leaf_type` must be set to `true` to\ndifferentiate it from standard DevRev object schemas.\n\nOnce the schema is created, you can create a custom object of type \xe2\x80\x9cCampaign\xe2\x80\x9d:\n\n```\n|  |  |\n| --- | --- |\n| $ |
Custom objects | DevRev | Docs
ART-2638_KNOWLEDGE_NODE-4
Response\n\nSuccess.\n\ncustom_objectobject\n\nShow 11 properties\n\n### Errors\n\n400\n\nBad Request Error\n\n401\n\nUnauthorized Error\n\n403\n\nForbidden Error\n\n429\n\nToo Many Requests Error\n\n500\n\nInternal Server Error\n\n503\n\nService Unavailable Error\n\nPOST\n\n/custom-objects.create\n\ncURL\n\n[code]\n\n    $| curl -X POST https://api.devrev.ai/custom-objects.create \\  \n    ---|---  \n    >|      -H "Authorization: Bearer <token>" \\  \n    >|      -H "Content-Type:
Create Custom Object (Beta) — DevRev | Docs
ART-15502_KNOWLEDGE_NODE-20
these variants. If you want to create a\ncampaign custom object with subtype \xe2\x80\x9csocial\\_media\xe2\x80\x9d, you can do so as follows:\n\n```\n|  |  |\n| --- | --- |\n| $ | curl --location \'https://api.devrev.ai/custom-objects.create\' \\ |\n| > | --header \'Content-Type: application/json\' \\ |\n| > | --header \'Accept: application/json\' \\ |\n| > | --header \'Authorization: Bearer <TOKEN>\' \\ |\n| > | --data \'{ |\n| > | "leaf_type": "campaign", |\n| > | "custom_schema_spec": {
Custom objects | DevRev | Docs
ART-15502_KNOWLEDGE_NODE-9
curl --location \'https://api.devrev.ai/custom-objects.create\' \\ |\n| > | --header \'Content-Type: application/json\' \\ |\n| > | --header \'Accept: application/json\' \\ |\n| > | --header \'Authorization: Bearer <TOKEN>\' \\ |\n| > | --data \'{ |\n| > | "leaf_type": "campaign", |\n| > | "custom_schema_spec": { |\n| > | "tenant_fragment": true |\n| > | }, |\n| > | "custom_fields": { |\n| > | "tnt__name": "Summer Sale 2023", |\n| > | "tnt__start_date": "2023-06-01", |\n| > | "tnt__end_date":
Custom objects | DevRev | Docs
ART-2683_KNOWLEDGE_NODE-10
\'https://api.devrev.ai/custom-objects.create\' \\  \n    ---|---  \n    >| --header \'Content-Type: application/json\' \\  \n    >| --header \'Accept: application/json\' \\  \n    >| --header \'Authorization: Bearer <TOKEN>\' \\  \n    >| --data \'{  \n    >|     "leaf_type": "campaign",  \n    >|     "unique_key": "CAMP-001",  \n    >|     "custom_schema_spec": {  \n    >|         "tenant_fragment": true  \n    >|     },  \n    >|     "custom_fields": {  \n    >|         "tnt__name": "Summer
Custom objects (Beta) — DevRev | Docs
ART-1564_KNOWLEDGE_NODE-109
custom-objects.count\n\nCounts custom objects.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type string Required\n\nLeaf type to filter.\n\nfilters list of any Optional\n\nList of filters to apply.\n\nResponse.\n\nThis endpoint returns an object.\ncount long\n\nThe count of custom objects.\n\nAPI Reference customization Custom Objects Create.\n\nPOST https://api.devrev.ai / custom-objects.create\n\nCreates a custom object.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type
List (Beta) — DevRev | Docs
ART-1545_KNOWLEDGE_NODE-109
custom-objects.count\n\nCounts custom objects.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type string Required\n\nLeaf type to filter.\n\nfilters list of any Optional\n\nList of filters to apply.\n\nResponse.\n\nThis endpoint returns an object.\ncount long\n\nThe count of custom objects.\n\nAPI Reference customization Custom Objects Create.\n\nPOST https://api.devrev.ai / custom-objects.create\n\nCreates a custom object.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type
Create (Beta) — DevRev | Docs
ART-1566_KNOWLEDGE_NODE-109
custom-objects.count\n\nCounts custom objects.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type string Required\n\nLeaf type to filter.\n\nfilters list of any Optional\n\nList of filters to apply.\n\nResponse.\n\nThis endpoint returns an object.\ncount long\n\nThe count of custom objects.\n\nAPI Reference customization Custom Objects Create.\n\nPOST https://api.devrev.ai / custom-objects.create\n\nCreates a custom object.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type
Transition (Beta) — DevRev | Docs
ART-1549_KNOWLEDGE_NODE-109
custom-objects.count\n\nCounts custom objects.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type string Required\n\nLeaf type to filter.\n\nfilters list of any Optional\n\nList of filters to apply.\n\nResponse.\n\nThis endpoint returns an object.\ncount long\n\nThe count of custom objects.\n\nAPI Reference customization Custom Objects Create.\n\nPOST https://api.devrev.ai / custom-objects.create\n\nCreates a custom object.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type
List Post (Beta) — DevRev | Docs
ART-1562_KNOWLEDGE_NODE-109
custom-objects.count\n\nCounts custom objects.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type string Required\n\nLeaf type to filter.\n\nfilters list of any Optional\n\nList of filters to apply.\n\nResponse.\n\nThis endpoint returns an object.\ncount long\n\nThe count of custom objects.\n\nAPI Reference customization Custom Objects Create.\n\nPOST https://api.devrev.ai / custom-objects.create\n\nCreates a custom object.\n\nRequest.\n\nThis endpoint expects an object.\nleaf_type
Get (Beta) — DevRev | Docs
ART-2683_KNOWLEDGE_NODE-6
objects\n\n[code]\n\n    $| curl --location \'https://api.devrev.ai/schemas.custom.set\' \\  \n    ---|---  \n    >| --header \'Content-Type: application/json\' \\  \n    >| --header \'Accept: application/json\' \\  \n    >| --header \'Authorization: Bearer <TOKEN>\' \\  \n    >| --data \'{  \n    >|     "type": "tenant_fragment",  \n    >|     "description": "Attributes for Campaign",  \n    >|     "leaf_type": "campaign",  \n    >|     "fields": [  \n    >|         {  \n    >|
Custom objects (Beta) — DevRev | Docs
ART-15324_KNOWLEDGE_NODE-5
must have the corresponding schema specified; omission results\nin a Bad Request error. If a custom schema is not included in the\nspecifier, it remains unchanged. For surfaces with human interactors,\nit is recommended to provide tenant\\_fragment: true and\nvalidate\\_required\\_fields: true.\n\nShow 4 properties\n\nstagestringOptional`format: "id"`\n\nThe stage of the custom object.\n\nstage\\_validation\\_optionslist of enumsOptional\n\nThe type of stage validations options when creating a
Create Custom Object | DevRev | Docs
ART-15343_KNOWLEDGE_NODE-0
b'Set Schemas Custom | DevRev | Docs\n\n[![]()![]()](https://developer.devrev.ai/)\n\nPublic\n\nPublic\n\nSearch\n\n`/`\n\n[API Reference](/api-reference/getting-started)[customization](/api-reference/customization/custom-objects-count)\n\nSet Schemas Custom\n==================\n\nCopy page\n\nPOST\n\nhttps://api.devrev.ai/schemas.custom.set\n\nPOST\n\n/schemas.custom.set\n\n```\n|  |  |\n| --- | --- |\n| $ | curl -X POST https://api.devrev.ai/schemas.custom.set \\ |\n| > | -H "Authorization:
Set Schemas Custom | DevRev | Docs
ART-15324_KNOWLEDGE_NODE-6
custom\nobject.\n\nAllowed values:allow\\_non\\_start\n\ntitlestringOptional`format: "text"`\n\nTitle of the custom object.\n\nunique\\_keystringOptional`format: "text"`\n\nThe unique key of the custom object.This can be used to hold an\nexternal reference to another object.\n\n### Response\n\nSuccess.\n\ncustom\\_objectobject\n\nShow 10 properties\n\n### Errors\n\n400\n\nBad Request Error\n\n401\n\nUnauthorized Error\n\n403\n\nForbidden Error\n\n429\n\nToo Many Requests
Create Custom Object | DevRev | Docs