Create a template from an envelope
curl --request POST \
--url https://api.atlaswork.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEnvelopeId": "<string>",
"name": "<string>",
"roles": [
{
"name": "<string>",
"participantId": "<string>",
"partyIndex": 1,
"isSender": true,
"optional": true
}
],
"lockedFieldIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceEnvelopeId: '<string>',
name: '<string>',
roles: [
{
name: '<string>',
participantId: '<string>',
partyIndex: 1,
isSender: true,
optional: true
}
],
lockedFieldIds: ['<string>']
})
};
fetch('https://api.atlaswork.ai/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.atlaswork.ai/api/v1/templates"
payload = {
"sourceEnvelopeId": "<string>",
"name": "<string>",
"roles": [
{
"name": "<string>",
"participantId": "<string>",
"partyIndex": 1,
"isSender": True,
"optional": True
}
],
"lockedFieldIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": {
"id": "<string>",
"organizationId": "<string>",
"teamId": "<string>",
"name": "<string>",
"originalFilename": "<string>",
"sourceFormat": "<string>",
"contentHash": "<string>",
"sizeBytes": 123,
"archivedAt": "2023-11-07T05:31:56Z",
"useCount": 1,
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"roles": [
{
"id": "<string>",
"templateId": "<string>",
"name": "<string>",
"apiRoleName": "<string>",
"orderIndex": 1,
"isSender": true,
"optional": true
}
],
"fields": [
{
"id": "<string>",
"templateId": "<string>",
"roleId": "<string>",
"page": 2,
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"label": "<string>",
"required": true,
"prefillValue": "<string>",
"prefillKey": "<string>",
"locked": true
}
]
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}Templates
Create a template from an envelope
Supports the optional Idempotency-Key header. Repeating the same key and request replays the original 201 response; a key currently in flight returns 409, and reusing a key with a different request returns 422.
POST
/
api
/
v1
/
templates
Create a template from an envelope
curl --request POST \
--url https://api.atlaswork.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEnvelopeId": "<string>",
"name": "<string>",
"roles": [
{
"name": "<string>",
"participantId": "<string>",
"partyIndex": 1,
"isSender": true,
"optional": true
}
],
"lockedFieldIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceEnvelopeId: '<string>',
name: '<string>',
roles: [
{
name: '<string>',
participantId: '<string>',
partyIndex: 1,
isSender: true,
optional: true
}
],
lockedFieldIds: ['<string>']
})
};
fetch('https://api.atlaswork.ai/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.atlaswork.ai/api/v1/templates"
payload = {
"sourceEnvelopeId": "<string>",
"name": "<string>",
"roles": [
{
"name": "<string>",
"participantId": "<string>",
"partyIndex": 1,
"isSender": True,
"optional": True
}
],
"lockedFieldIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": {
"id": "<string>",
"organizationId": "<string>",
"teamId": "<string>",
"name": "<string>",
"originalFilename": "<string>",
"sourceFormat": "<string>",
"contentHash": "<string>",
"sizeBytes": 123,
"archivedAt": "2023-11-07T05:31:56Z",
"useCount": 1,
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"roles": [
{
"id": "<string>",
"templateId": "<string>",
"name": "<string>",
"apiRoleName": "<string>",
"orderIndex": 1,
"isSender": true,
"optional": true
}
],
"fields": [
{
"id": "<string>",
"templateId": "<string>",
"roleId": "<string>",
"page": 2,
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"label": "<string>",
"required": true,
"prefillValue": "<string>",
"prefillKey": "<string>",
"locked": true
}
]
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
apiKeyoauthJwt
Organization API key (format atlas_sk_...), passed as a bearer token or the x-api-key header. Created and revoked in the dashboard (Better Auth api-key plugin); shown in full only once and stored hashed.
Body
application/json
⌘I