Skip to content

Create a User

Request

Create a user

Security
Auth0(Required scopes: offline_accessmanage:services)
Bodyapplication/jsonrequired
titlestring, <= 64 characters
activeboolean
languagestring
zone_namestring
first_namestring, [ 1 .. 32 ] charactersrequired
last_namestring, [ 1 .. 32 ] charactersrequired
phonestring, <= 24 characters
usernamestring, [ 1 .. 255 ] charactersrequired
rolesArray of integers(roles)required

Possible values:

  • 2: "admin",
  • 3: "manager",
  • 4: "reporter",
  • 5: "internal",
  • 6: "agency" ,
  • 7: "edit_data_definition",
  • 8: "view_data_definition",
  • 9: "edit_segments",
  • 10: "view_segments",
  • 11: "edit_campaigns",
  • 13: "edit_margins_and_performance",
  • 14: "view_organizations",
  • 15: "view_dmp_reports",
  • 16: "manage_contracts",
  • 17: "view_contracts". Some values can't be used with each other, for example 3 and 4. For more information use "/roles" request.
Example:
[ 4, 6 ]
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/users \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "string",
    "active": true,
    "language": "string",
    "zone_name": "string",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "username": "string",
    "roles": [
      4,
      6
    ]
  }'

Responses

User created response

Bodyapplication/json
dataobject(user)
metaobject
Response
{ "data": { "title": "string", "active": true, "language": "string", "zone_name": "string", "id": 0, "entity_type": "string", "username": "string", "version": 0, "first_name": "string", "last_name": "string", "link_ldap": true, "link_saml": true, "phone": "string", "mobile": "string", "fax": "string", "type": "string", "role": "string", "scope": "string", "view_organizations": true, "edit_campaigns": true, "edit_margins_and_performance": true, "creator_id": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "last_login_on": "string", "access_internal_fees": true, "view_segments": true, "edit_segments": true, "view_data_definition": true, "edit_data_definition": true, "view_dmp_reports": true, "email": "string", "roles": [ … ], "permissions": { … } }, "meta": { "status": "success" } }