Discussions
Post to add subscribers is not working!
I am trying a lot of different possibilities... and any of them is working:
curl --location --request POST 'https://api.postscript.io/api/v2/subscribers'
--header 'Accept: application/json'
--header 'Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--header 'Content-Type: application/json'
--data-raw '{
"phone_number": "4372225500",
"metadata": {
"email": "[email protected]"
},
"keyword": "HELLOTKEES"
}'
{"errors":[{"loc":["origin"],"msg":"field required","type":"value_error.missing"}]}
curl --location --request POST 'https://api.postscript.io/api/v2/subscribers'
--header 'Accept: application/json'
--header 'Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--header 'Content-Type: application/json'
--data-raw '{
"phone_number": "4372225500",
"metadata": {
"email": "[email protected]"
},
"keyword_id": "139153"
}'
{"errors":[{"loc":["origin"],"msg":"field required","type":"value_error.missing"},{"loc":["keyword"],"msg":"Must provide keyword
OR keyword_id
, one is required.","type":"value_error"}]}
curl --location --request POST 'https://api.postscript.io/api/v2/subscribers'
--header 'Accept: application/json'
--header 'Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--header 'Content-Type: application/json'
--data-raw '{
"phone_number": "4372225500",
"metadata": {
"email": "[email protected]"
},
"keyword_id": 139153
}'
{"errors":[{"loc":["origin"],"msg":"field required","type":"value_error.missing"},{"loc":["keyword"],"msg":"Must provide keyword
OR keyword_id
, one is required.","type":"value_error"}]}
curl --location --request POST 'https://api.postscript.io/api/v2/subscribers'
--header 'Accept: application/json'
--header 'Authorization: Bearer sk_bba6ffee6d7ac7913cdeef1da55dfba6'
--header 'Content-Type: application/json'
--data-raw '{
"phone_number": "4372225500",
"metadata": {
"email": "[email protected]"
},
"keyword_id": 139153,
"keyword": "HELLOTKEES"
}'
{"errors":[{"loc":["origin"],"msg":"field required","type":"value_error.missing"},{"loc":["keyword_id"],"msg":"Must provide keyword
OR keyword_id
, not both.","type":"value_error"}]}
I really don't know what to do!