The Mylink API allows you to generate customizable redirect links, organized into your own link groups. Each redirect will be tracked, and the data will be available for retrieval.
To use this API, you must have a bearer token with a “mylink” scope to be valid. The token must be generated using the AuthAPI.
Here is a list of internal error codes, these errors only appear in the context of an HTTP 500 status.
| Code | HTTP Status |
|---|---|
| MYL-1 | 500 |
| MYL-4 | 500 |
| MYL-10 | 500 |
| MYL-11 | 500 |
| MYL-13 | 500 |
| Code | Description | HTTP Status |
|---|---|---|
| MYL-2 | Invalid route | 404 |
| MYL-3 | A parameter is missing or invalid in the request body (e.g., parameter sent as a string instead of an integer) | 422 |
| MYL-5 | Missing token | 401 |
| MYL-6 | Invalid token signature | 400 |
| MYL-7 | Expired token | 400 |
| MYL-8 | Invalid token | 400 |
| MYL-9 | Unauthorized access to the service (invalid token) | 403 |
| MYL-12 | No result found | 404 |
| MYL-14 | No redirection link found | 400 |
Create as many links as specified by the number with provided parameters
Informations to provide for validation
| number required | integer The number of links to create |
| link_group_id required | integer The link group id |
| domain | string or null Domain of the link |
| external_ref | string or null The external reference you may want to add. Must be an UUID |
| redirect_url | string or null The valid URL to redirect to |
{- "number": 0,
- "link_group_id": 0,
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}[- {
- "id": 0,
- "link_group_id": 0,
- "tag": "string",
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}
]Retrieve a specific link by his id
| link_id required | integer Id of the link to retrieve |
{- "id": 0,
- "link_group_id": 0,
- "tag": "string",
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}Update a specific link found by his id with provided parameters
| link_id required | integer Id of the link to update |
Informations to provide for validation
| domain | string or null Domain of the link |
| external_ref | string or null The external reference you may want to update. Must be an UUID |
| redirect_url | string or null The valid URL to redirect to |
{- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}{- "id": 0,
- "link_group_id": 0,
- "tag": "string",
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}Retrieve a specific link by his tag
| tag required | integer Tag of the link to retrieve |
{- "id": 0,
- "link_group_id": 0,
- "tag": "string",
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}Create a link group with provided parameters
Informations to provide for validation
| name required | string Name of the group of links |
| fallback_url | string or null The global URL where you want to redirect if redirection url do not exist on a child link |
{- "name": "string",
- "fallback_url": "string"
}[- {
- "id": 0,
- "client_id": "string",
- "name": "string",
- "fallback_url": "string"
}
]Retrieve a specific link group by his id
| link_group_id required | integer Id of the link group to retrieve |
{- "id": 0,
- "client_id": "string",
- "name": "string",
- "fallback_url": "string"
}Update a specific link group found by his id with provided parameters
| link_group_id required | integer Id of the link group to update |
Informations to provide for validation
| name | string or null Name of the group of links, (if value is null, no changes will be made) |
| fallback_url | string or null The global URL where you want to redirect if redirection url do not exist on a child link |
{- "name": "string",
- "fallback_url": "string"
}{- "id": 0,
- "client_id": "string",
- "name": "string",
- "fallback_url": "string"
}Retrieve all links of a specific link group
| link_group_id required | integer Id of the link group |
[- {
- "id": 0,
- "link_group_id": 0,
- "tag": "string",
- "domain": "string",
- "external_ref": "string",
- "redirect_url": "string"
}
]