Reference
Folders
Folders: 4 operations (folders.list, folders.create, folders.update, folders.delete).
| Method | Path | Operation |
|---|---|---|
GET | /v1/folders | folders.list |
POST | /v1/folders | folders.create |
PATCH | /v1/folders/{folder_id} | folders.update |
DELETE | /v1/folders/{folder_id} | folders.delete |
folders.list
GET/v1/folders
The workspace's lead folders with their lead counts, and how many leads are in none.
| Operation id | folders.list |
| Scopes | leads:read |
| Rate class | `read` |
| Idempotency | Not applicable |
| Keys | Developer keys |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | yes | |
unfiled_count | integer | yes | -9007199254740991 to 9007199254740991 |
Errors
Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.
Example
curl "https://api.dmhero.ai/v1/folders" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"lead_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"name",
"lead_count",
"created_at"
],
"additionalProperties": false
}
},
"unfiled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"data",
"unfiled_count"
],
"additionalProperties": false
}folders.create
POST/v1/folders
Create a lead folder.
| Operation id | folders.create |
| Scopes | leads:write |
| Rate class | `write` |
| Idempotency | `Idempotency-Key` accepted |
| Keys | Developer keys |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
Response 201
| Field | Type | Required | Description |
|---|---|---|---|
created_at | date-time | yes | |
id | string | yes | |
lead_count | integer | yes | -9007199254740991 to 9007199254740991 |
name | string | yes |
Errors
| Status | Code | When |
|---|---|---|
| 409 | `FOLDER_NAME_TAKEN_409` | A folder with this name already exists in the workspace. |
Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.
Example
curl -X POST "https://api.dmhero.ai/v1/folders" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'JSON Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"lead_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"name",
"lead_count",
"created_at"
],
"additionalProperties": false
}folders.update
PATCH/v1/folders/{folder_id}
Rename a lead folder.
| Operation id | folders.update |
| Scopes | leads:write |
| Rate class | `write` |
| Idempotency | Not applicable |
| Keys | Developer keys |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
folder_id | string | yes | The folder id.. 1 to 200 characters |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
created_at | date-time | yes | |
id | string | yes | |
lead_count | integer | yes | -9007199254740991 to 9007199254740991 |
name | string | yes |
Errors
| Status | Code | When |
|---|---|---|
| 404 | `FOLDER_NOT_FOUND_404` | No folder with this id exists in this workspace. |
| 409 | `FOLDER_NAME_TAKEN_409` | A folder with this name already exists in the workspace. |
Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.
Example
curl -X PATCH "https://api.dmhero.ai/v1/folders/string" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'JSON Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"lead_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"name",
"lead_count",
"created_at"
],
"additionalProperties": false
}folders.delete
DELETE/v1/folders/{folder_id}
Delete a lead folder. Its leads are kept and end up in no folder.
| Operation id | folders.delete |
| Scopes | leads:write |
| Rate class | `write` |
| Idempotency | Not applicable |
| Keys | Developer keys |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
folder_id | string | yes | The folder id.. 1 to 200 characters |
Response 204
No body.
Errors
| Status | Code | When |
|---|---|---|
| 404 | `FOLDER_NOT_FOUND_404` | No folder with this id exists in this workspace. |
Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.
Example
curl -X DELETE "https://api.dmhero.ai/v1/folders/string" \
-H "Authorization: Bearer $DMHERO_API_KEY"