Model overview
The API is organized around the following resources:
Model | Base endpoint (/v1 ) | Description |
---|---|---|
Account | /account all workspaces | Get info about your own account. |
Workspace | /account/workspaces all workspaces | Manage your workspaces collection. Each workspace can host links, domains, tags and scripts and you can invite teammates to collaborate in workspaces. |
Domain | /domains in workspace | Manage all branded domains shared into the workspace. |
Link | /links in workspace | Manage your branded short links collection. |
Tag | /tags in workspace | Manage a collection of tags you can attach to your links in the context of a specific workspace. |
Script | /scripts in workspace | Manage a collection of retargeting scripts you can attach to your links in the context of a specific workspace. |
All endpoints return responses in JSON format.
Types
Types in objects are defined as follow:
Type name | Type description | Example |
---|---|---|
object | Generic Rebrandly API model | A Domain object |
string | UTF8 string | "foo" |
integer | 64-bit integer | 42 |
boolean | Boolean | true |
timestamp | String with format: "YYYY-MM-ddTHH:mm:ss.mmmZ" | "2016-07-03T13:13:12.123Z" |
array of string | CSV string | "desc,asc" |
decimal | Floating point number | 3.4 |
General approaches
The API also uses common approaches for the following:
Concept | Solution |
---|---|
Response data | All responses are in JSON format, encoded with utf-8. A response can be an object, a list of objects, or a primitive value. |
Authorization layer | All endpoints are protected with OAuth 2.0 Bearer token or with API key authorization |
HTTP/HTTPS | Methods are used in accordance with HTTP (GET POST, PATCH and DELETE are the only methods used) and resources are identified using URIs. |
Successful operation | HTTP 200 responses returning JSON objects |
Invalid operation | HTTP 403 responses with JSON validation info |
Unauthorized operation | HTTP 401 response |
API rate exceeded | HTTP 429 response |
Server error | HTTP 50x response with JSON details |
IMPORTANT: use HTTPS only connection
Despite Rebrandly API still accepts incoming HTTP requests, there are plans to discontinue the HTTP access totally. Make sure that your script leverage an HTTPS connection with API.
Updated 5 months ago