Skip to main content
POST
/
api
/
contacts
Create contact
curl --request POST \
  --url https://folksbase.onrender.com/api/contacts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "company": "<string>",
  "notes": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "company": "<string>",
  "notes": "<string>",
  "avatar_url": "<string>",
  "is_unsubscribed": true,
  "custom_fields": {},
  "created_at": "<string>",
  "updated_at": "<string>",
  "tags": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "color": "<string>",
      "emoji": "<string>",
      "created_at": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Supabase JWT token from Authorization header

Body

application/json
email
string<email>
required
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
first_name
string
required
Required string length: 1 - 100
last_name
string | null
Maximum string length: 100
phone
string | null
Maximum string length: 50
company
string | null
Maximum string length: 200
notes
string | null

Response

Contact created

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
workspace_id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
email
string
required
first_name
string
required
last_name
string | null
required
phone
string | null
required
company
string | null
required
notes
string | null
required
avatar_url
string | null
required
is_unsubscribed
boolean
required
custom_fields
object
required
created_at
string
required
updated_at
string
required
tags
object[]