Stylograph API

Add a recipient without mailing them

Adds someone to the address book of the key's team, so a later send can name them by `recipient_id`. Nothing is mailed or charged, and no address check runs here: the send checks the address. Takes the fields a send's `recipient` takes and nothing more (never an email, notes about the person or a birthday). Someone already in the address book with the same name and address (ignoring case) is answered with their entry and `created: false`. The key's member needs a role that can change recipients (Org Admin, Team Admin or Operator). A team adds at most 1000 recipients in any 24 hours through the API.

POST
/api/v1/recipients

Adds someone to the address book of the key's team, so a later send can name them by recipient_id. Nothing is mailed or charged, and no address check runs here: the send checks the address. Takes the fields a send's recipient takes and nothing more (never an email, notes about the person or a birthday). Someone already in the address book with the same name and address (ignoring case) is answered with their entry and created: false. The key's member needs a role that can change recipients (Org Admin, Team Admin or Operator). A team adds at most 1000 recipients in any 24 hours through the API.

Authorization

ApiKeyAuth
headerAuthorizationBearer <API key (sg_live_...)>

An API key from Settings.

Request Body

application/json
  1. body

Someone not in your address book yet (needs recipients:write). Matched to an existing entry with the same name and address, ignoring case; otherwise added once the send passes every check.

honorific?|
Lengthlength <= 20
first_name*string
Lengthlength <= 100
last_name*string
Lengthlength <= 100
company?|

Written on the envelope under the name.

Lengthlength <= 100
address_line1*string
Lengthlength <= 200
address_line2?|
Lengthlength <= 200
city*string
Lengthlength <= 100
state*string

Two-letter state code.

Match^[A-Za-z]{2}$
zip*string
Match^\d{5}(-\d{4})?$

Response Body

Already in the address book; nothing was added.

application/json
  1. response
data*
created?boolean

On an add: true when the person was added, false when the address book already had them at that address (nothing was added).

Example Request
curl -X POST 'https://composer.stylograph.ai/api/v1/recipients' \  -H 'Content-Type: application/json' \  -d '{  "first_name": "string",  "last_name": "string",  "address_line1": "string",  "city": "string",  "state": "string",  "zip": "string"}'
Example Response
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "honorific": "string",    "first_name": "string",    "last_name": "string",    "company": "string",    "city": "string",    "state": "string",    "address_complete": true  },  "created": true}