Pinal Developers

API reference

Contacts

The people in someone's address book.

Base URL https://api.pinal.tech/v1

List contacts

GET /contacts

Everyone in the address book.

Query parameters

  • q string

    Match name, email or phone.

  • limit integer

    Items per page, 1–100.

  • cursor string

    Opaque cursor from a previous page's next_cursor.

Responses

curl "https://api.pinal.tech/v1/contacts" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response · 200
{
  "contacts": [
    {
      "id": "string",
      "name": "string",
      "emails": [
        {
          "label": "string",
          "value": "alex@pinal.email"
        }
      ],
      "phones": [
        {
          "label": "string",
          "value": "string"
        }
      ],
      "organization": "string",
      "notes": "string",
      "groups": [
        "string"
      ]
    }
  ],
  "next_cursor": "string"
}

Create a contact

POST /contacts

Adds someone to the address book.

Request body application/json

  • id string read-only
  • name string
  • emails array of object
  • phones array of object
  • organization string
  • notes string
  • groups array of string

Responses

curl -X POST "https://api.pinal.tech/v1/contacts" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "name": "string",
    "emails": [
      {
        "label": "string",
        "value": "alex@pinal.email"
      }
    ],
    "phones": [
      {
        "label": "string",
        "value": "string"
      }
    ],
    "organization": "string",
    "notes": "string",
    "groups": [
      "string"
    ]
  }'
Response · 201
{
  "id": "string",
  "name": "string",
  "emails": [
    {
      "label": "string",
      "value": "alex@pinal.email"
    }
  ],
  "phones": [
    {
      "label": "string",
      "value": "string"
    }
  ],
  "organization": "string",
  "notes": "string",
  "groups": [
    "string"
  ]
}

Get a contact

GET /contacts/{id}

One contact.

Path parameters

  • id string required

    Contact ID.

Responses

curl "https://api.pinal.tech/v1/contacts/{id}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response · 200
{
  "id": "string",
  "name": "string",
  "emails": [
    {
      "label": "string",
      "value": "alex@pinal.email"
    }
  ],
  "phones": [
    {
      "label": "string",
      "value": "string"
    }
  ],
  "organization": "string",
  "notes": "string",
  "groups": [
    "string"
  ]
}

Delete a contact

DELETE /contacts/{id}

Removes the contact.

Path parameters

  • id string required

    Contact ID.

Responses

curl -X DELETE "https://api.pinal.tech/v1/contacts/{id}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"