curl --location --request POST 'https://api.nameshouts.com/api/v2.0/user/user-list/add-name-to-list?name=John-Abrams2&language=English&user_list_id=82076&email=test%40test2.com' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
"Name added to list."
[
"Name not on database. Missing Name information sent to NameShouts."
]
"Name already in list"
Lists
Add Name to a User List
POST
/
user
/
user-list
/
add-name-to-list
curl --location --request POST 'https://api.nameshouts.com/api/v2.0/user/user-list/add-name-to-list?name=John-Abrams2&language=English&user_list_id=82076&email=test%40test2.com' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
"Name added to list."
[
"Name not on database. Missing Name information sent to NameShouts."
]
"Name already in list"
POST
POST https://api.nameshouts.com/api/v2.0/user/user-list/add-name-to-list?name=John-Abrams2&language=English&user_list_id=82076&email=test@test2.com
| Parameters | Description |
|---|---|
| name | The name to be added. Please note that for multiple names, the format has to be “John-Smith” and not “John Smith”. |
| language | The language of origin. If not know, you can use English as the default. |
| user_list_id | The unique identifier for the list |
| Email is an optional parameter. This will be the email of the person that the name belongs to. |
"Name added to list."
If the name is missing from the database, the name will be automatically requested to NameShouts. "Name not on database. Missing Name information sent to NameShouts."
If the name already exists, then the response object will return the following message. "Name already in list"
The examples below show the response for three scenarios.
Note: You can add the same name “John Smith” for two unique emails. You will not be able to add the same name with the same email more than once on the list.
Authorization
| Bearer Token | |
|---|---|
| Token | <token> |
Params
string
The name to be added to the list. Please note that spaces between names should be delimited by hypens(-).Example:
John-Abrams2string
The language of origin for the name. If the language of origin is not known, please use “English” as a default.Example:
Englishstring
The unique identifier for the listExample:
82076string
Email is an optional parameter. This is the email of the person that the name belongs to.Example:
test@test2.comExamples
Added to List.
Example Requestcurl
curl --location -g --request POST '{{base_url}}/api/v2.0/user/user-list/add-name-to-list?name=John-Smith&language=English&user_list_id=12&email=test4%40test.com'
200 OK
Body
"Name added to list."
| Key | Value |
|---|---|
| Server | nginx/1.23.3 |
| Content-Type | application/json |
| Transfer-Encoding | chunked |
| Connection | keep-alive |
| Vary | Accept-Encoding |
| X-Powered-By | PHP/7.4.33 |
| Cache-Control | no-cache, private |
| Date | Wed, 20 Sep 2023 05:56:35 GMT |
| Content-Encoding | gzip |
Missing from Database.
Example Requestcurl
curl --location -g --request POST '{{base_url}}/api/v2.0/user/user-list/add-name-to-list?name=Johnr-Smith&language=English&user_list_id=12&email=test4%40test.com'
200 OK
Body
[
"Name not on database. Missing Name information sent to NameShouts."
]
| Key | Value |
|---|---|
| Server | nginx/1.23.3 |
| Content-Type | application/json |
| Transfer-Encoding | chunked |
| Connection | keep-alive |
| Vary | Accept-Encoding |
| X-Powered-By | PHP/7.4.33 |
| Cache-Control | no-cache, private |
| Date | Wed, 20 Sep 2023 05:57:03 GMT |
| Content-Encoding | gzip |
Already on List.
Example Requestcurl
curl --location -g --request POST '{{base_url}}/api/v2.0/user/user-list/add-name-to-list?name=John-Smith&language=English&user_list_id=12&email=test4%40test.com'
400 Bad Request
Body
"Name already in list"
| Key | Value |
|---|---|
| Server | nginx/1.23.3 |
| Content-Type | application/json |
| Transfer-Encoding | chunked |
| Connection | keep-alive |
| X-Powered-By | PHP/7.4.33 |
| Cache-Control | no-cache, private |
| Date | Wed, 20 Sep 2023 06:52:48 GMT |
curl --location --request POST 'https://api.nameshouts.com/api/v2.0/user/user-list/add-name-to-list?name=John-Abrams2&language=English&user_list_id=82076&email=test%40test2.com' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
"Name added to list."
[
"Name not on database. Missing Name information sent to NameShouts."
]
"Name already in list"
