Postcards
reading time 5 minutes
The guide how to use Postcards API.
This API endpoint uses an HTTP POST
request. You must provide api_token within the body, which can be found under the Settings
section in the Inkit application (see below).
Postcard Webhook Endpoint: https://internal.inkit.io/integrations/webhook
curl --header "Content-Type: application/json" -d
'{
"api_token":"<token>",
"template_id":"<template_id>",
"first_name": "Elon",
"last_name": "Musk",
"email":"[email protected]",
"company":"SpaceX",
"phone":"3107099497",
"address_line_1": "1 Rocket Road",
"address_line_2": "Suite 1",
"address_city": "Hawthorne",
"address_state": "CA",
"address_zip": "90250",
"address_country": "US",
"source": "Webhook"
}'
-H "Content-Type: application/json" -X POST https://internal.inkit.io/integrations/webhook
NoteAny field that doesn't exist in the data structure will be stored as custom data.
Custom data can be used for displaying dynamic data if the merge fields are selected in the template.
Request Schema
| Field | Type | Description | |api_token
| string | Authorization token which allow to use API calls (see below) | |template_id
| string | ID of the template from the Inkit UI (see below) | |first_name
| string | The first name of the contact (optional but either first_name or last_name is required) | |last_name
| string | The last name of the contact (optional but either first_name or last_name is required) | |company
| string | The company name that the contact belongs to (optional) | |phone
| string | The phone number of the contact (optional) | |address_line_1
| string | The primary line, or street address of the contact (64-character limit) | |address_line_2
| string | The apartment or suite number (optional) | |address_city
| string | The city of the contact's address | |address_state
| string | The two-letter (2) state code of the contact's address | |address_zip
| string | The ZIP Code of the contact's address | |address_country
| string | The two-letter (2) ISO alpha-2 country code of the contact's address |
API Token and Template ID
1. Template ID is located and can be copied under the Templates
section in the app.
1. Template ID is located and can be copied under the
Templates
section in the app. 
2. API Token
2. API Token
You can find the information how to obtain API token by clicking on this link.
Response
202 Accepted HTTP response will be returned for successful post request.
Otherwise, you will receive an error message. The meaning of them you can find here.
Questions?
We're happy to help get your code set up or answer questions you might have.Search our documentation, check the help center, or connect with our sales team.
Ask our support team ([email protected]) questions if you run into any technical roadblocks.
Updated 26 days ago
What’s Next