Stylograph API

Edit a recipient

Changes one recipient of the key's team: only the fields sent. A recipient on another team, or one that was deleted, answers 404. The key's member needs a role that can change recipients. A team changes at most 200 addresses a day through the API (a name or company edit doesn't count); past that, 429 `RECIPIENT_EDIT_LIMIT_REACHED`. Stylograph keeps each edit's old fields, so a wrong edit can be put back.

PATCH
/api/v1/recipients/{recipientId}

Changes one recipient of the key's team: only the fields sent. A recipient on another team, or one that was deleted, answers 404. The key's member needs a role that can change recipients. A team changes at most 200 addresses a day through the API (a name or company edit doesn't count); past that, 429 RECIPIENT_EDIT_LIMIT_REACHED. Stylograph keeps each edit's old fields, so a wrong edit can be put back.

Authorization

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

An API key from Settings.

Path Parameters

recipientId*string
Formatuuid

Request Body

application/json
  1. body

Only the fields to change. A name or an address line can be changed but not blanked. Changing an address line clears the stored address check, so the next send checks the new address; a note already sent keeps the address it was sent with.

Properties1 <= properties
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

Changed.

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 PATCH 'https://composer.stylograph.ai/api/v1/recipients/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
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}