{"openapi":"3.0.3","info":{"title":"bacd.my API","description":"Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.","version":"0.0.1","contact":{"name":"bacd.my Support","email":"support@bacd.my","url":"https://bacd.my/api"},"license":{"name":"AGPL-3.0 license","url":"https://github.com/dubinc/dub/blob/main/LICENSE.md"}},"servers":[{"url":"https://api.bacd.my","description":"Production API"}],"paths":{"/links":{"post":{"operationId":"createLink","summary":"Create a new link","description":"Create a new link for the authenticated project.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","minLength":1,"description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the project will be used (or `bacd.my` if the project has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"A senha necessária para acessar a URL de destino do link encurtado."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}},"responses":{"200":{"description":"The created link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"getLinks","summary":"Retrieve a list of links","description":"Retrieve a list of links for the authenticated project. The list will be paginated and the provided query parameters allow filtering the returned links.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true},{"in":"query","name":"domain","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the project will be returned.","schema":{"type":"string","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the project will be returned."}},{"in":"query","name":"tagId","description":"[DEPRECATED (use tagIds instead)]: The tag ID to filter the links by.","schema":{"type":"string","description":"[DEPRECATED (use tagIds instead)]: The tag ID to filter the links by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the links by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the links by."}},{"in":"query","name":"search","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","schema":{"type":"string","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the links by.","schema":{"type":"string","description":"The user ID to filter the links by."}},{"in":"query","name":"showArchived","description":"Whether to include archived links in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include archived links in the response. Defaults to `false` if not provided."}},{"in":"query","name":"withTags","description":"Whether to include tags in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include tags in the response. Defaults to `false` if not provided."}},{"in":"query","name":"sort","description":"The field to sort the links by. The default is `createdAt`, and sort order is always descending.","schema":{"type":"string","enum":["createdAt","clicks","lastClicked"],"default":"createdAt","description":"The field to sort the links by. The default is `createdAt`, and sort order is always descending."}},{"in":"query","name":"page","description":"The page number for pagination (each page contains 100 links).","schema":{"type":"number","description":"The page number for pagination (each page contains 100 links)."}}],"responses":{"200":{"description":"A list of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/links/count":{"get":{"operationId":"getLinksCount","summary":"Retrieve the number of links","description":"Retrieve the number of links for the authenticated project. The provided query parameters allow filtering the returned links.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true},{"in":"query","name":"domain","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the project will be returned.","schema":{"type":"string","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the project will be returned."}},{"in":"query","name":"tagId","description":"[DEPRECATED (use tagIds instead)]: The tag ID to filter the links by.","schema":{"type":"string","description":"[DEPRECATED (use tagIds instead)]: The tag ID to filter the links by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the links by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the links by."}},{"in":"query","name":"search","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","schema":{"type":"string","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the links by.","schema":{"type":"string","description":"The user ID to filter the links by."}},{"in":"query","name":"showArchived","description":"Whether to include archived links in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include archived links in the response. Defaults to `false` if not provided."}},{"in":"query","name":"withTags","description":"Whether to include tags in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include tags in the response. Defaults to `false` if not provided."}},{"in":"query","name":"groupBy","description":"The field to group the links by.","schema":{"anyOf":[{"type":"string","enum":["domain"]},{"type":"string","enum":["tagId"]}],"description":"The field to group the links by."}}],"responses":{"200":{"description":"A list of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/links/info":{"get":{"operationId":"getLinkInfo","summary":"Retrieve a link","description":"Retrieve the info for a link from their domain and key.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","minLength":1,"description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true},{"in":"query","name":"domain","description":"The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`.","schema":{"type":"string","minLength":1,"description":"The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`."},"required":true},{"in":"query","name":"key","description":"The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.","schema":{"type":"string","minLength":1,"description":"The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`."},"required":true}],"responses":{"200":{"description":"The retrieved link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/links/{linkId}":{"put":{"operationId":"editLink","summary":"Edit a link","description":"Edit a link for the authenticated project.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"linkId","description":"The id of the link to edit. You can get this via the `getLinkInfo` endpoint.","schema":{"type":"string","description":"The id of the link to edit. You can get this via the `getLinkInfo` endpoint."},"required":true},{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","minLength":1,"description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the project will be used (or `bacd.my` if the project has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"A senha necessária para acessar a URL de destino do link encurtado."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}},"responses":{"200":{"description":"The edited link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"operationId":"deleteLink","summary":"Delete a link","description":"Delete a link for the authenticated project.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"linkId","description":"The id of the link to delete. You can get this via the `getLinkInfo` endpoint.","schema":{"type":"string","description":"The id of the link to delete. You can get this via the `getLinkInfo` endpoint."},"required":true},{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true}],"responses":{"200":{"description":"The deleted link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/links/bulk":{"post":{"operationId":"bulkCreateLinks","summary":"Bulk create links","description":"Bulk create up to 100 links for the authenticated project.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","minLength":1,"description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the project will be used (or `bacd.my` if the project has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"A senha necessária para acessar a URL de destino do link encurtado."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}}},"responses":{"200":{"description":"The created links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/qr":{"get":{"operationId":"getQRCode","summary":"Retrieve a QR code","description":"Retrieve a QR code for a link.","tags":["QR Codes"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"url","description":"The URL to generate a QR code for. Defaults to `https://bacd.my` if not provided.","schema":{"type":"string","format":"uri","default":"https://bacd.my","description":"The URL to generate a QR code for. Defaults to `https://bacd.my` if not provided."}},{"in":"query","name":"size","description":"The size of the QR code in pixels. Defaults to `600` if not provided.","schema":{"type":"number","default":600,"description":"The size of the QR code in pixels. Defaults to `600` if not provided."}},{"in":"query","name":"level","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided.","schema":{"type":"string","enum":["L","M","Q","H"],"default":"L","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided."}},{"in":"query","name":"fgColor","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.","schema":{"type":"string","default":"#000000","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."}},{"in":"query","name":"bgColor","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.","schema":{"type":"string","default":"#FFFFFF","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."}},{"in":"query","name":"includeMargin","description":"Whether to include a margin around the QR code. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include a margin around the QR code. Defaults to `false` if not provided."}}],"responses":{"200":{"description":"The QR code","content":{"image/png":{"schema":{"type":"string"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/clicks":{"get":{"operationId":"getClicksAnalytics","summary":"Retrieve clicks analytics","description":"Retrieve the number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The number of clicks","content":{"application/json":{"schema":{"type":"number","description":"The number of clicks"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/timeseries":{"get":{"operationId":"getTimeseriesAnalytics","summary":"Retrieve timeseries analytics","description":"Retrieve the number of clicks for a link, a domain, or the authenticated project over a period of time.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The number of clicks over a period of time","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"The starting timestamp of the interval"},"clicks":{"type":"number","description":"The number of clicks in the interval"}},"required":["start","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/country":{"get":{"operationId":"getCountryAnalytics","summary":"Retrieve country analytics","description":"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top countries by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code: https://d.to/geo"},"clicks":{"type":"number","description":"The number of clicks from this country"}},"required":["country","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/city":{"get":{"operationId":"getCityAnalytics","summary":"Retrieve city analytics","description":"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top cities by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string","description":"The name of the city"},"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code of the city: https://d.to/geo"},"clicks":{"type":"number","description":"The number of clicks from this city"}},"required":["city","country","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/device":{"get":{"operationId":"getDeviceAnalytics","summary":"Retrieve device analytics","description":"Retrieve the top devices by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top devices by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","description":"The name of the device"},"clicks":{"type":"number","description":"The number of clicks from this device"}},"required":["device","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/browser":{"get":{"operationId":"getBrowserAnalytics","summary":"Retrieve browser analytics","description":"Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top browsers by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"string","description":"The name of the browser"},"clicks":{"type":"number","description":"The number of clicks from this browser"}},"required":["browser","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/os":{"get":{"operationId":"getOSAnalytics","summary":"Retrieve OS analytics","description":"Retrieve the top OS by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top OS by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","description":"The name of the OS"},"clicks":{"type":"number","description":"The number of clicks from this OS"}},"required":["os","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/referer":{"get":{"operationId":"getRefererAnalytics","summary":"Retrieve referer analytics","description":"Retrieve the top referers by number of clicks for a link, a domain, or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top referers by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"referer":{"type":"string","description":"The name of the referer. If unknown, this will be `(direct)`"},"clicks":{"type":"number","description":"The number of clicks from this referer"}},"required":["referer","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/top_links":{"get":{"operationId":"getTopLinks","summary":"Retrieve top links","description":"Retrieve the top links by number of clicks for a domain or the authenticated project.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top links by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"link":{"type":"string","description":"The unique ID of the short link"},"clicks":{"type":"number","description":"The number of clicks from this link"}},"required":["link","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/analytics/top_urls":{"get":{"operationId":"getTopURLs","summary":"Retrieve top URLs","description":"Retrieve the top URLs by number of clicks for a given short link.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project that the link belongs to. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."}},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top URLs by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The destination URL"},"clicks":{"type":"number","description":"The number of clicks from this URL"}},"required":["url","clicks"]}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/projects":{"get":{"operationId":"getProjects","summary":"Retrieve a list of projects","description":"Retrieve a list of projects for the authenticated user.","tags":["Projects"],"security":[{"bearerToken":[]}],"responses":{"200":{"description":"A list of projects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSchema"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/projects/{projectSlug}":{"get":{"operationId":"getProject","summary":"Retrieve a project","description":"Retrieve a project for the authenticated user.","tags":["Projects"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"projectSlug","description":"The slug for the project to retrieve. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`.","schema":{"type":"string","description":"The slug for the project to retrieve. E.g. for `app.bacd.my/acme`, the projectSlug is `acme`."},"required":true}],"responses":{"200":{"description":"The retrieved project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/tags":{"post":{"operationId":"createTag","summary":"Create a new tag","description":"Create a new tag for the authenticated project.","tags":["Tags"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project to create tags for. E.g. for `app.bacd.my/acme`, the `projectSlug` is `acme`.","schema":{"type":"string","description":"The slug for the project to create tags for. E.g. for `app.bacd.my/acme`, the `projectSlug` is `acme`."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":"string","minLength":1,"description":"The name of the tag to create."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown."}},"required":["tag"]}}}},"responses":{"201":{"description":"The created tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagSchema"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"getTags","summary":"Retrieve a list of tags","description":"Retrieve a list of tags for the authenticated project.","tags":["Tags"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"projectSlug","description":"The slug for the project to retrieve tags for. E.g. for `app.bacd.my/acme`, the `projectSlug` is `acme`.","schema":{"type":"string","description":"The slug for the project to retrieve tags for. E.g. for `app.bacd.my/acme`, the `projectSlug` is `acme`."},"required":true}],"responses":{"200":{"description":"A list of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagSchema"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://bacd.my/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"securitySchemes":{"bearerToken":{"type":"http","description":"Default authentication mechanism","scheme":"bearer"}},"schemas":{"LinkSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the short link."},"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the project will be used (or `bacd.my` if the project has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"A senha necessária para acessar a URL de destino do link encurtado."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.bacd.my/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED (use `tags` instead)]: The unique ID of the tag assigned to the short link.","deprecated":true},"tags":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TagSchema"},"description":"The tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://bacd.my/try`)."},"qrCode":{"type":"string","format":"uri","description":"The full URL of the QR code for the short link (e.g. `https://api.bacd.my/qr?url=https://bacd.my/try`)."},"utm_source":{"type":"string","nullable":true,"description":"The UTM source of the short link."},"utm_medium":{"type":"string","nullable":true,"description":"The UTM medium of the short link."},"utm_campaign":{"type":"string","nullable":true,"description":"The UTM campaign of the short link."},"utm_term":{"type":"string","nullable":true,"description":"The UTM term of the short link."},"utm_content":{"type":"string","nullable":true,"description":"The UTM content of the short link."},"userId":{"type":"string","description":"The user ID of the creator of the short link."},"projectId":{"type":"string","description":"The project ID of the short link."},"clicks":{"type":"number","default":0,"description":"The number of clicks on the short link."},"lastClicked":{"type":"string","nullable":true,"description":"The date and time when the short link was last clicked."},"createdAt":{"type":"string","description":"The date and time when the short link was created."},"updatedAt":{"type":"string","description":"The date and time when the short link was last updated."}},"required":["id","domain","key","url","archived","expiresAt","password","proxy","title","description","image","rewrite","ios","android","geo","publicStats","tagId","tags","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","userId","projectId","clicks","lastClicked","createdAt","updatedAt"],"title":"Link"},"ProjectSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the project."},"name":{"type":"string","description":"The name of the project."},"slug":{"type":"string","description":"The slug of the project."},"logo":{"type":"string","nullable":true,"default":null,"description":"The logo of the project."},"usage":{"type":"number","description":"The usage of the project."},"usageLimit":{"type":"number","description":"The usage limit of the project."},"linksUsage":{"type":"number","description":"The links usage of the project."},"linksLimit":{"type":"number","description":"The links limit of the project."},"domainsLimit":{"type":"number","description":"The domains limit of the project."},"tagsLimit":{"type":"number","description":"The tags limit of the project."},"usersLimit":{"type":"number","description":"The users limit of the project."},"plan":{"type":"string","enum":["free","pro","business","business plus","business extra","business max","enterprise"],"description":"The plan of the project."},"stripeId":{"type":"string","nullable":true,"description":"The Stripe ID of the project."},"billingCycleStart":{"type":"number","description":"The date and time when the billing cycle starts for the project."},"createdAt":{"type":"string","description":"The date and time when the project was created."},"users":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"],"description":"The role of the authenticated user in the project."}},"required":["role"]},"description":"The role of the authenticated user in the project."},"domains":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The domain of the project."}},"required":["slug"]},"description":"The domains of the project."}},"required":["id","name","slug","logo","usage","usageLimit","linksUsage","linksLimit","domainsLimit","tagsLimit","usersLimit","plan","stripeId","billingCycleStart","createdAt","users","domains"],"title":"Project"},"TagSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the tag."},"name":{"type":"string","description":"The name of the tag."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag."}},"required":["id","name","color"],"title":"Tag"}}}}