DoneTalk Developers Sign in

Contact fields

List the contact fields

GET /v1/c/{slug}/contact-fields · Scopes: fields:read · contacts:read

The company's fields (key, name in three languages, type, options). Each contact's values come in the contact's fields.

Path parameters

FieldNotes
slugThe company's identifier in DoneTalk (the key's own).

Request example

curl -X GET "https://api.donetalk.com/v1/c/demo/contact-fields" \
  -H "Authorization: Bearer $DONETALK_KEY"

Response 200

{
  "fields": [
    {
      "key": "cpf",
      "label": {
        "pt-BR": "CPF",
        "en": "CPF",
        "es": "CPF"
      },
      "type": "cpf",
      "options": null,
      "aiExtractable": true,
      "aiExtractionHint": null,
      "required": false,
      "sort": 1,
      "isActive": true
    }
  ]
}

Possible errors

  • 401 unauthorized
  • 403 insufficient_scope
  • 422 validation_failed
  • 429 rate_limited

Create a field

POST /v1/c/{slug}/contact-fields · Scopes: fields:write

Path parameters

FieldNotes
slugThe company's identifier in DoneTalk (the key's own).

Request body

FieldTypeRequiredNotes
keystringyes
labelstring · objectyes
typeone of text, number, date, boolean, select, phone, email, cpf, cnpjyes
optionslist of stringnoup to 50; null
aiExtractablebooleannodefault false
aiExtractionHintstringnoup to 300 characters; null
requiredbooleannodefault false
sortintegernoup to 1000

Request example

curl -X POST "https://api.donetalk.com/v1/c/demo/contact-fields" \
  -H "Authorization: Bearer $DONETALK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "plano",
  "label": "Plano",
  "type": "select",
  "options": [
    "mensal",
    "anual"
  ]
}'

Response 201

{
  "field": {
    "key": "cpf",
    "label": {
      "pt-BR": "CPF",
      "en": "CPF",
      "es": "CPF"
    },
    "type": "cpf",
    "options": null,
    "aiExtractable": true,
    "aiExtractionHint": null,
    "required": false,
    "sort": 1,
    "isActive": true
  }
}

Possible errors

  • 401 unauthorized
  • 403 insufficient_scope
  • 422 validation_failed
  • 429 rate_limited

Edit a field

PATCH /v1/c/{slug}/contact-fields/{key} · Scopes: fields:write

Path parameters

FieldNotes
slugThe company's identifier in DoneTalk (the key's own).
keyThe key (of the field or the card).

Request body

FieldTypeRequiredNotes
labelstring · objectno
optionslist of stringnoup to 50; null
aiExtractablebooleanno
aiExtractionHintstringnoup to 300 characters; null
requiredbooleanno
sortintegernoup to 1000
isActivebooleanno

Request example

curl -X PATCH "https://api.donetalk.com/v1/c/demo/contact-fields/:key" \
  -H "Authorization: Bearer $DONETALK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "options": [
    "mensal",
    "semestral",
    "anual"
  ]
}'

Response 200

{
  "ok": true
}

Possible errors

  • 401 unauthorized
  • 403 insufficient_scope
  • 422 validation_failed
  • 429 rate_limited

This page as Markdown