Skip to content

Commit 9764e3c

Browse files
authored
Merge pull request #18 from mailtrap/MT-20837-fix-contacts-post-patch-endpoint-curl-examples
MT-20837 Add contact object for contact create and update endpoints cURL examples
2 parents e9ce4b6 + 0671484 commit 9764e3c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

specs/contacts.openapi.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ paths:
7272
-H 'Authorization: Bearer YOUR_API_TOKEN' \
7373
-H 'Content-Type: application/json' \
7474
-d '{
75-
"email": "john.smith@example.com",
76-
"fields": {"first_name": "John", "last_name": "Smith", "company": "Example Inc"},
77-
"list_ids": [1, 2, 3]
75+
"contact": {
76+
"email": "john.smith@example.com",
77+
"fields": {"first_name": "John", "last_name": "Smith", "company": "Example Inc"},
78+
"list_ids": [1, 2, 3]
79+
}
7880
}'
7981
- lang: javascript
8082
label: Node.js
@@ -436,7 +438,7 @@ paths:
436438
curl -X PATCH https://mailtrap.io/api/accounts/{account_id}/contacts/{contact_identifier} \
437439
-H 'Authorization: Bearer YOUR_API_TOKEN' \
438440
-H 'Content-Type: application/json' \
439-
-d '{"email": "new@example.com", "fields": {"first_name": "John"}}'
441+
-d '{"contact": { "email": "new@example.com", "fields": {"first_name": "John"}}}'
440442
- lang: javascript
441443
label: Node.js
442444
source: |

0 commit comments

Comments
 (0)