curl --request POST \
--url https://dev-public-api.openphone.dev/v1/contacts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultFields": {
"firstName": "John",
"company": "Quo",
"emails": [
{
"name": "company email",
"value": "abc@example.com"
}
],
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901"
}
],
"role": "Sales"
},
"customFields": [
{
"value": [
"option1",
"option2"
],
"key": "inbound-lead"
}
],
"createdByUserId": "US123abc",
"source": "public-api",
"sourceUrl": "https://openphone.co/contacts/664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec"
}
'{
"data": {
"id": "664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"sourceUrl": "https://openphone.co/contacts/664d0db69fcac7cf2e6ec",
"defaultFields": {
"company": "Quo",
"emails": [
{
"name": "company email",
"value": "abc@example.com",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"name": "Inbound Lead",
"type": "multi-select",
"value": [
"option1",
"option2"
],
"key": "inbound-lead",
"id": "66d0d87d534de8fd1c433cec3"
}
],
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"createdByUserId": "US123abc"
}
}{
"message": "<string>",
"code": "0801400",
"status": 400,
"docs": "https://quo.com/docs",
"title": "Invalid Custom Field Item",
"description": "Invalid Custom Field Item",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800401",
"status": 401,
"docs": "https://quo.com/docs",
"title": "Unauthorized",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0801403",
"status": 403,
"docs": "https://quo.com/docs",
"title": "Not Phone Number User",
"description": "Not Phone Number User",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800404",
"status": 404,
"docs": "https://quo.com/docs",
"title": "Not Found",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800409",
"status": 409,
"docs": "https://quo.com/docs",
"title": "Conflict",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0801500",
"status": 500,
"docs": "https://quo.com/docs",
"title": "Unknown",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}Create a contact
Create a contact for a workspace.
curl --request POST \
--url https://dev-public-api.openphone.dev/v1/contacts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultFields": {
"firstName": "John",
"company": "Quo",
"emails": [
{
"name": "company email",
"value": "abc@example.com"
}
],
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901"
}
],
"role": "Sales"
},
"customFields": [
{
"value": [
"option1",
"option2"
],
"key": "inbound-lead"
}
],
"createdByUserId": "US123abc",
"source": "public-api",
"sourceUrl": "https://openphone.co/contacts/664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec"
}
'{
"data": {
"id": "664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"sourceUrl": "https://openphone.co/contacts/664d0db69fcac7cf2e6ec",
"defaultFields": {
"company": "Quo",
"emails": [
{
"name": "company email",
"value": "abc@example.com",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"name": "Inbound Lead",
"type": "multi-select",
"value": [
"option1",
"option2"
],
"key": "inbound-lead",
"id": "66d0d87d534de8fd1c433cec3"
}
],
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"createdByUserId": "US123abc"
}
}{
"message": "<string>",
"code": "0801400",
"status": 400,
"docs": "https://quo.com/docs",
"title": "Invalid Custom Field Item",
"description": "Invalid Custom Field Item",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800401",
"status": 401,
"docs": "https://quo.com/docs",
"title": "Unauthorized",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0801403",
"status": 403,
"docs": "https://quo.com/docs",
"title": "Not Phone Number User",
"description": "Not Phone Number User",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800404",
"status": 404,
"docs": "https://quo.com/docs",
"title": "Not Found",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0800409",
"status": 409,
"docs": "https://quo.com/docs",
"title": "Conflict",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}{
"message": "<string>",
"code": "0801500",
"status": 500,
"docs": "https://quo.com/docs",
"title": "Unknown",
"trace": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>",
"schema": {
"type": "<string>"
},
"value": "<unknown>"
}
]
}Authorizations
Body
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
The unique identifier of the user who created the contact.
^US(.*)$"US123abc"
The contact's source. Defaults to null for contacts created in the UI. Defaults to public-api for contacts created via the public API. Cannot be one of the following reserved words: openphone, device, csv, zapier, google-people, other or start with one of the following reserved prefixes: openphone, csv.
1 - 72"public-api"
"custom-hubspot"
"google-calendar"
A link to the contact in the source system.
1 - 200"https://openphone.co/contacts/664d0db69fcac7cf2e6ec"
A unique identifier from an external system that can optionally be supplied when creating a contact. This ID is used to associate the contact with records in other systems and is required for retrieving the contact later via the "List Contacts" endpoint. Ensure the externalId is unique and consistent across systems for accurate cross-referencing.
1 - 75"664d0db69fcac7cf2e6ec"
Response
Created
Show child attributes
Show child attributes
Was this page helpful?