Surge
POST
/accounts/{account_id}/contacts

Creates a new Contact object.

Authorization

authorization
AuthorizationBearer <token>

In: header

Path Parameters

account_id*string

The account for which the contact should be created.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.surge.app/accounts/acct_01j9a43avnfqzbjfch6pygv1td/contacts" \  -H "Content-Type: application/json" \  -d '{    "email": "dom@toretto.family",    "first_name": "Dominic",    "last_name": "Toretto",    "metadata": {      "car": "1970 Dodge Charger R/T"    },    "phone_number": "+18015551234"  }'
{
  "email": "dom@toretto.family",
  "first_name": "Dominic",
  "id": "ctc_01j9dy8mdzfn3r0e8x1tbdrdrf",
  "last_name": "Toretto",
  "metadata": {
    "car": "1970 Dodge Charger R/T"
  },
  "phone_number": "+18015551234"
}
{
  "error": {
    "message": "The requested resource could not be found.",
    "type": "not_found"
  }
}