{"openapi":"3.0.3","info":{"title":"Retrac API","description":"Retreac is an inventory management infrastructure for business owners.","version":"0.0.1","contact":{"name":"Retrac Support","email":"support@retrac.co","url":"https://api.retrac.co"}},"servers":[{"url":"https://api.retrac.co","description":"Production API"}],"x-speakeasy-globals":{"parameters":[{"x-speakeasy-globals-hidden":true,"name":"workspaceId","in":"query","required":true,"schema":{"type":"string"}},{"x-speakeasy-globals-hidden":true,"name":"projectSlug","in":"query","deprecated":true,"schema":{"type":"string"}}]},"paths":{"/items":{"post":{"operationId":"createItem","x-speakeasy-name-override":"create","x-speakeasy-usage-example":true,"summary":"Create a new item","description":"Create a new item for the authenticated workspace.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string","description":"The SKU of the item.","example":"FITEM"},"description":{"type":"string","description":"The item description."},"cost":{"type":"number","description":"The cost of the item."},"supplier":{"type":"string","nullable":true,"description":"The supplier of the item."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short item.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short item."},"tagNames":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique name of the tags assigned to the item (case insensitive)."}},"required":["sku","description","cost"]}}}},"responses":{"200":{"description":"The created item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"get":{"operationId":"getItems","x-speakeasy-name-override":"list","x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"pageSize","in":"parameters","type":"limit"}],"outputs":{"results":"$"}},"summary":"Retrieve a list of items","description":"Retrieve a paginated list of items for the authenticated workspace.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"sku","description":"The SKU of the item.","schema":{"type":"string","description":"The SKU of the item."}},{"in":"query","name":"description","description":"The item description.","schema":{"type":"string","description":"The item description."}},{"in":"query","name":"cost","description":"The item cost.","schema":{"type":"number","description":"The item cost."}},{"in":"query","name":"supplier","description":"The item supplier.","schema":{"type":"string","description":"The item supplier."}},{"in":"query","name":"tagId","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the items by.","schema":{"type":"string","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the items by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the items by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the items by."}},{"in":"query","name":"tagNames","description":"The unique name of the tags assigned to the short link (case insensitive).","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique name of the tags assigned to the short link (case insensitive)."}},{"in":"query","name":"search","description":"The search term to filter the items by. The search term will be matched against the short item slug and the destination url.","schema":{"type":"string","description":"The search term to filter the items by. The search term will be matched against the short item slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the items by.","schema":{"type":"string","description":"The user ID to filter the items by."}},{"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 items by. The default is `createdAt`.","schema":{"type":"string","enum":["updatedAt","createdAt","sku","description","cost"],"default":"createdAt","description":"The field to sort the items by. The default is `createdAt`."}},{"in":"query","name":"order","description":"The sort order for the items. The default is `desc`.","schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The sort order for the items. The default is `desc`."}},{"in":"query","name":"page","description":"The page number for pagination.","schema":{"type":"number","minimum":0,"exclusiveMinimum":true,"default":1,"description":"The page number for pagination.","example":1}},{"in":"query","name":"pageSize","description":"The number of items per page.","schema":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":100,"description":"The number of items per page.","example":50}}],"responses":{"200":{"description":"A list of items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ItemSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/items/count":{"get":{"operationId":"getItemsCount","x-speakeasy-name-override":"count","summary":"Retrieve the number of items","description":"Retrieve the number of items for the authenticated workspace. The provided query parameters allow filtering the returned items.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}},{"in":"query","name":"sku","description":"The SKU of the item.","schema":{"type":"string","description":"The SKU of the item."}},{"in":"query","name":"description","description":"The item description.","schema":{"type":"string","description":"The item description."}},{"in":"query","name":"cost","description":"The item cost.","schema":{"type":"number","description":"The item cost."}},{"in":"query","name":"supplier","description":"The item supplier.","schema":{"type":"string","description":"The item supplier."}},{"in":"query","name":"tagId","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the items by.","schema":{"type":"string","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the items by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the items by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the items by."}},{"in":"query","name":"tagNames","description":"The unique name of the tags assigned to the short link (case insensitive).","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique name of the tags assigned to the short link (case insensitive)."}},{"in":"query","name":"search","description":"The search term to filter the items by. The search term will be matched against the short item slug and the destination url.","schema":{"type":"string","description":"The search term to filter the items by. The search term will be matched against the short item slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the items by.","schema":{"type":"string","description":"The user ID to filter the items by."}},{"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 items by.","schema":{"anyOf":[{"type":"string","enum":["tagId"]},{"type":"string","enum":["userId"]}],"description":"The field to group the items by."}}],"responses":{"200":{"description":"A list of items","content":{"application/json":{"schema":{"type":"number","description":"The number of items matching the query."}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/items/info":{"get":{"operationId":"getItemInfo","x-speakeasy-name-override":"get","summary":"Retrieve an item","description":"Retrieve the info for an item.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}},{"in":"query","name":"itemId","description":"The unique ID of the item.","schema":{"type":"string","description":"The unique ID of the item.","example":"clux0rgak00011..."}}],"responses":{"200":{"description":"The retrieved item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/items/{itemId}":{"patch":{"operationId":"updateItem","x-speakeasy-name-override":"update","x-speakeasy-max-method-params":2,"summary":"Update an item","description":"Update an item for the authenticated workspace. If there's no change, returns it as it is.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"itemId","description":"The id of the item to update. You may use either `itemId` (obtained via `/items/info` endpoint) or `externalId` prefixed with `ext_`.","schema":{"type":"string","description":"The id of the item to update. You may use either `itemId` (obtained via `/items/info` endpoint) or `externalId` prefixed with `ext_`."},"required":true},{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string","description":"The SKU of the item.","example":"FITEM"},"description":{"type":"string","description":"The item description."},"cost":{"type":"number","description":"The cost of the item."},"supplier":{"type":"string","nullable":true,"description":"The supplier of the item."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short item.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short item."},"tagNames":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique name of the tags assigned to the item (case insensitive)."}},"required":["sku","description","cost"]}}}},"responses":{"200":{"description":"The updated item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"delete":{"operationId":"deleteItem","x-speakeasy-name-override":"delete","x-speakeasy-max-method-params":1,"summary":"Delete an item","description":"Delete an item for the authenticated workspace.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"itemId","description":"The id of the item to delete. You may use either `itemId` (obtained via `/items/info` endpoint) or `externalId` prefixed with `ext_`.","schema":{"type":"string","description":"The id of the item to delete. You may use either `itemId` (obtained via `/items/info` endpoint) or `externalId` prefixed with `ext_`."},"required":true},{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}}],"responses":{"200":{"description":"The deleted item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the item."}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/items/bulk":{"post":{"operationId":"bulkCreateItems","x-speakeasy-name-override":"createMany","summary":"Bulk create items","description":"Bulk create up to 100 items for the authenticated workspace.","tags":["Items"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","description":"The SKU of the item.","example":"FITEM"},"description":{"type":"string","description":"The item description."},"cost":{"type":"number","description":"The cost of the item."},"supplier":{"type":"string","nullable":true,"description":"The supplier of the item."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short item.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short item."},"tagNames":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique name of the tags assigned to the item (case insensitive)."}},"required":["sku","description","cost"]}}}}},"responses":{"200":{"description":"The created items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ItemSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/workspaces":{"get":{"operationId":"getWorkspaces","x-speakeasy-name-override":"list","summary":"Retrieve a list of workspaces","description":"Retrieve a list of workspaces for the authenticated user.","tags":["Workspaces"],"security":[{"token":[]}],"responses":{"200":{"description":"A list of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"post":{"operationId":"createWorkspace","x-speakeasy-name-override":"create","summary":"Create a workspace","description":"Create a new workspace for the authenticated user.","tags":["Workspaces"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"slug":{"type":"string","minLength":3,"maxLength":48}},"required":["name","slug"]}}}},"responses":{"200":{"description":"The created workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/workspaces/{idOrSlug}":{"get":{"operationId":"getWorkspace","x-speakeasy-name-override":"get","summary":"Retrieve a workspace","description":"Retrieve a workspace for the authenticated user.","tags":["Workspaces"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"idOrSlug","description":"The ID or slug of the workspace.","schema":{"type":"string","description":"The ID or slug of the workspace."},"required":true}],"responses":{"200":{"description":"The retrieved workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/tags":{"post":{"operationId":"createTag","x-speakeasy-name-override":"create","summary":"Create a new tag","description":"Create a new tag for the authenticated workspace.","tags":["Tags"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":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":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"get":{"operationId":"getTags","x-speakeasy-name-override":"list","summary":"Retrieve a list of tags","description":"Retrieve a list of tags for the authenticated workspace.","tags":["Tags"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace.","schema":{"type":"string","description":"The ID of the workspace.","example":"ws_cluuwcv0r..."},"required":true},{"in":"query","name":"projectSlug","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","schema":{"type":"string","description":"The slug of the project. This field is deprecated – use `workspaceId` instead.","deprecated":true}}],"responses":{"200":{"description":"A list of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}},"components":{"securitySchemes":{"token":{"type":"http","description":"Default authentication mechanism","scheme":"bearer","x-speakeasy-example":"RETRAC_API_KEY"}},"schemas":{"ItemSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the short item."},"sku":{"type":"string","description":"The SKU of the item."},"description":{"type":"string","description":"The item description."},"supplier":{"type":"string","nullable":true,"description":"The supplier of the item."},"cost":{"type":"number","description":"The item cost."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use `tags` instead): The unique ID of the tag assigned to the short item.","deprecated":true},"tags":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TagSchema"},"description":"The tags assigned to the short item."},"userId":{"type":"string","description":"The user ID of the creator of the short item."},"workspaceId":{"type":"string","description":"The workspace ID of the short item."},"createdAt":{"type":"string","description":"The date and time when the short item was created."},"updatedAt":{"type":"string","description":"The date and time when the short item was last updated."},"projectId":{"type":"string","description":"[DEPRECATED] (use workspaceId instead): The project ID of the short item.","deprecated":true}},"required":["id","sku","description","supplier","cost","tagId","tags","userId","workspaceId","createdAt","updatedAt","projectId"],"title":"Item"},"WorkspaceSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the workspace."},"name":{"type":"string","description":"The name of the workspace."},"slug":{"type":"string","description":"The slug of the workspace."},"logo":{"type":"string","nullable":true,"default":null,"description":"The logo of the workspace."},"usage":{"type":"number","description":"The usage of the workspace."},"usageLimit":{"type":"number","description":"The usage limit of the workspace."},"itemsUsage":{"type":"number","description":"The items usage of the workspace."},"itemsLimit":{"type":"number","description":"The items limit of the workspace."},"storagesLimit":{"type":"number","description":"The storage units limit of the workspace."},"tagsLimit":{"type":"number","description":"The tags limit of the workspace."},"usersLimit":{"type":"number","description":"The users limit of the workspace."},"plan":{"type":"string","enum":["free","pro","business","business plus","business extra","business max","enterprise"],"description":"The plan of the workspace."},"stripeId":{"type":"string","nullable":true,"description":"The Stripe ID of the workspace."},"billingCycleStart":{"type":"number","description":"The date and time when the billing cycle starts for the workspace."},"createdAt":{"type":"string","description":"The date and time when the workspace was created."},"users":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"],"description":"The role of the authenticated user in the workspace."}},"required":["role"]},"description":"The role of the authenticated user in the workspace."},"inviteCode":{"type":"string","nullable":true,"description":"The invite code of the workspace."}},"required":["id","name","slug","logo","usage","usageLimit","itemsUsage","itemsLimit","storagesLimit","tagsLimit","usersLimit","plan","stripeId","billingCycleStart","createdAt","users","inviteCode"],"title":"Workspace"},"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"}},"responses":{"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":{"x-speakeasy-name-override":"BadRequest","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://docs.retrac.co/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":{"x-speakeasy-name-override":"Unauthorized","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://docs.retrac.co/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":{"x-speakeasy-name-override":"Forbidden","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://docs.retrac.co/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"x-speakeasy-name-override":"NotFound","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://docs.retrac.co/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":{"x-speakeasy-name-override":"Conflict","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://docs.retrac.co/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":{"x-speakeasy-name-override":"InviteExpired","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://docs.retrac.co/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":{"x-speakeasy-name-override":"UnprocessableEntity","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://docs.retrac.co/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":{"x-speakeasy-name-override":"RateLimitExceeded","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://docs.retrac.co/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":{"x-speakeasy-name-override":"InternalServerError","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://docs.retrac.co/api-reference/errors#internal-server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}}