POST login/users/:user id/mpact client ids
(Difference between revisions)
(Created page with "{{DISPLAYTITLE:POST login/users/:user id/mpact client ids}} == Description == Creates a new MPact client associated with an user. == Resource URL == POST https://api.soc...") |
(→Request) |
||
Line 63: | Line 63: | ||
Creates a new MPact client with identifier "my_mpact_client_id" and associates it with the user "180". | Creates a new MPact client with identifier "my_mpact_client_id" and associates it with the user "180". | ||
− | curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/180/ | + | curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/180/mpact_client_ids' \ |
-d '{"mpact_client_id": "my_mpact_client_id" }' \ | -d '{"mpact_client_id": "my_mpact_client_id" }' \ | ||
-H 'Content-type: application/json' \ | -H 'Content-type: application/json' \ |
Revision as of 13:59, 26 December 2014
Contents |
Description
Creates a new MPact client associated with an user.
Resource URL
POST https://api.socialidnow.com/v1/marketing/login/users/:user_id/mpact_client_ids
Parameters
URL Parameters
user_id | required | user identifier. |
---|
JSON Parameters
mpact_client_id | required | MPact client identifier. |
---|
Authentication
This API requires Marketing Account authentication. See Authentication.
Response
Response Status
created (201) | The MPact client was created successfully and associated with the user. |
---|---|
ok (200) | The MPact client had already been associated with the user. |
bad_request (400) | The parameter "mpact_client_id" was not informed. |
unauthorized (401) | The authentication is wrong. See Authentication. |
unprocessable_entity (422) | Validation error in the field "mpact_client_id". |
forbidden (403) | The user does not belong to the Marketing Account. |
internal_server_error (500) | An unknown error happened. |
Examples
Request
Creates a new MPact client with identifier "my_mpact_client_id" and associates it with the user "180".
curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/180/mpact_client_ids' \ -d '{"mpact_client_id": "my_mpact_client_id" }' \ -H 'Content-type: application/json' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 201 Created Status: 201