Shares

Create a share

POST/api/share

Creates a named share for a website, board, link, or pixel with parameters and an optional custom slug.

Try it

POST/api/share
Authorization

Credentials stay in this browser tab and are never sent anywhere except the API.

Response

Send a request to see the response.

Headers

NameTypeDescription
AuthorizationrequiredstringToken returned by POST /api/auth/login, or an API key (`umami_…`) created under Settings → API keys (self-hosted only). Bearer <token>.

Request body

NameTypeDescription
entityIdrequiredstringID of the resource being shared.
namerequiredstringDisplay name of the resource.
parametersrequiredobjectConfiguration parameters for the resource.
shareTyperequiredintegerType of resource made available by the share.
slugstringURL slug used to access the resource.
Example request

Responses

200The operation completed successfully.
NameTypeDescription
createdAtrequiredstringDate and time the record was created.
entityIdrequiredstringID of the resource being shared.
idrequiredstringUnique identifier of the resource.
namerequiredstringDisplay name of the resource.
parametersrequiredanyOfConfiguration parameters for the resource.
shareTyperequirednumberType of resource made available by the share.
slugrequiredstringURL slug used to access the resource.
updatedAtrequiredstringDate and time the record was last updated.
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example

Code samples

cURL