Credentials

API for managing credentials CRUD


Parameters

Name In Type Required Description
username path string true a username of Grupo Masmovil
org path string true a orgID of Grupo Masmovil

Request example

1
2
3
4
5

curl -X DELETE https://credentials.masstack.com/v1/orgs/{org}/credentials/{username} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
204 No Content OK None
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
409 Conflict Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Mamovil
org path string true a orgID of Grupo Mamovil

Request example

1
2
3
4
5

curl -X GET https://credentials.masstack.com/v1/orgs/{org}/credentials/{username} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Credential retrieved during check process Credential
404 Not Found Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Mamovil
org path string true a orgID of Grupo Mamovil
body body InboundChangeStatusCredential true Password and security token.

Request body - instance of InboundChangeStatusCredential

1
2
3
4
{
  "enabled": true,
  "require2fa": true
}
Name Type Required Description
enabled boolean true Enables or disables the credential
require2fa boolean false If true the 2fa is required

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

curl -X PATCH https://credentials.masstack.com/v1/orgs/{org}/credentials/{username} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'enabled': true,
  'require2fa': true
}" 

Responses

Code Meaning Description Schema
204 No Content OK None
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Mamovil
org path string true a orgID of Grupo Mamovil

Request example

1
2
3
4
5

curl -X POST https://credentials.masstack.com/v1/orgs/{org}/credentials/{username} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
201 Created Security token to set or change password TokenResponse
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
409 Conflict Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Mamovil
org path string true a orgID of Grupo Mamovil
body body InboundCredential true Password and security token.

Request body - instance of InboundCredential

1
2
3
4
{
  "password": "string",
  "token": "string"
}
Name Type Required Description
password string true New password for the customer credential
token string true Security token issued in order to change passwords

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

curl -X PUT https://credentials.masstack.com/v1/orgs/{org}/credentials/{username} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'password': 'string',
  'token': 'string'
}" 

Responses

Code Meaning Description Schema
204 No Content OK None
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
409 Conflict Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Masmovil
org path string true Origin organization ID
body body InboundMigrateCredential true Destination organization for the credential move

Request body - instance of InboundMigrateCredential

1
2
3
{
  "destinationOrg": "yoigo"
}
Name Type Required Description
destinationOrg string true Destination organization ID

Request example

1
2
3
4
5
6
7
8
9

curl -X POST https://credentials.masstack.com/v1/orgs/{org}/credentials/move/{username} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'destinationOrg': 'yoigo'
}" 

Responses

Code Meaning Description Schema
200 OK Credential move successful response MoveCredentialResponse
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Masmovil
org path string true Origin organization ID
body body InboundMigrateCredential true Destination organization for the credential copy

Request body - instance of InboundMigrateCredential

1
2
3
{
  "destinationOrg": "yoigo"
}
Name Type Required Description
destinationOrg string true Destination organization ID

Request example

1
2
3
4
5
6
7
8
9

curl -X POST https://credentials.masstack.com/v1/orgs/{org}/credentials/copy/{username} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'destinationOrg': 'yoigo'
}" 

Responses

Code Meaning Description Schema
200 OK Credential copy successful response CopyCredentialResponse
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Parameters

Name In Type Required Description
username path string true a username of Grupo Masmovil
org path string true Organization ID (context for the request)

Request example

1
2
3
4
5

curl -X GET https://credentials.masstack.com/v1/orgs/{org}/credentials/discover/{username} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK List of credentials found across different organizations [CredentialDiscoverResponse]
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
500 Internal Server Error Error response ErrorDto

200 - instance of CredentialDiscoverResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[
  {
    "org": "masmovil",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "require2fa": true,
    "last_login_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "username": "heimdall@masmovil.com",
    "crm": "qvantel"
  }
]
Name Type Required Description
org string true Organization where the credential was found
id string false Credential ID
created_at string(date-time) true Creation date
enabled boolean true If true it’s enabled
require2fa boolean false If true the 2fa is required
last_login_at string(date-time) false Date of last successful login
updated_at string(date-time) true Date of last update
username string true Username
crm string false The CRM where the credential belongs to

Parameters

Name In Type Required Description
username path string true a username of Grupo Mamovil
org path string true a orgID of Grupo Mamovil

Request example

1
2
3
4
5

curl -X POST https://credentials.masstack.com/v1/orgs/{org}/credentials/{username}/change_password \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
201 Created Security token to set or change password TokenResponse
400 Bad Request Error response ErrorDto
401 Unauthorized Error response ErrorDto
403 Forbidden Error response ErrorDto
404 Not Found Error response ErrorDto
409 Conflict Error response ErrorDto
500 Internal Server Error Error response ErrorDto

Endpoints

Credentials

    Flows

      Tokens

        Magic links

          OTP

            TOTP

              Devices