# Discord

## GET /v1/stores/{storeId}/product\_versions/{productVersionId}/discord\_actions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordActionDto":{"required":["action_type","discord_server_id","execution_stage","id","product_id","product_version_id","revocation_stages","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions":{"get":{"tags":["discord"],"operationId":"ProductsDiscord_GetActions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productVersionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/product\_versions/{productVersionId}/discord\_actions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SetDiscordActionDto":{"required":["action_type","discord_server_id","execution_stage"],"type":"object","properties":{"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionDto":{"required":["action_type","discord_server_id","execution_stage","id","product_id","product_version_id","revocation_stages","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions":{"put":{"tags":["discord"],"operationId":"ProductsDiscord_CreateAction","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productVersionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordActionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/orders/{orderId}/discord

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordProfileDto":{"required":["avatar_hash","discord_id","username"],"type":"object","properties":{"discord_id":{"$ref":"#/components/schemas/FlakeId"},"username":{"type":"string"},"avatar_hash":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/discord":{"get":{"tags":["discord"],"operationId":"OrdersDiscord_GetLinkedDiscordAccounts","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DiscordProfileDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/orders/{orderId}/discord/queued

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"QueuedDiscordActionDto":{"required":["action_type","delivery_item_id","discord_server_id","enqueued_at","execution_stage","executions","id","product_id","product_version_id","revocation_stages","status","store_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"status":{"$ref":"#/components/schemas/QueuedDiscordActionStatus"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"delivery_item_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"discord_user_id":{"$ref":"#/components/schemas/FlakeId"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"enqueued_at":{"type":"string","format":"date-time"},"finalised_at":{"type":["null","string"],"format":"date-time"},"executions":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionDto"}}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/discord/queued":{"get":{"tags":["discord"],"operationId":"OrdersDiscord_GetDiscordActionExecutionHistory","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"QueuedDiscordActionDto":{"required":["action_type","delivery_item_id","discord_server_id","enqueued_at","execution_stage","executions","id","product_id","product_version_id","revocation_stages","status","store_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"status":{"$ref":"#/components/schemas/QueuedDiscordActionStatus"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"delivery_item_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"discord_user_id":{"$ref":"#/components/schemas/FlakeId"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"enqueued_at":{"type":"string","format":"date-time"},"finalised_at":{"type":["null","string"],"format":"date-time"},"executions":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionDto"}}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued":{"get":{"tags":["discord"],"operationId":"DiscordInventoryItem_GetQueuedDiscordActionForDeliveryItem","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordProfileDto":{"required":["avatar_hash","discord_id","username"],"type":"object","properties":{"discord_id":{"$ref":"#/components/schemas/FlakeId"},"username":{"type":"string"},"avatar_hash":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"get":{"tags":["discord"],"operationId":"DiscordInventoryItem_GetUserToDeliveryItemLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordProfileDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"put":{"tags":["discord"],"operationId":"DiscordInventoryItem_SetUserToDeliveryItemLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordUserId","in":"query","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"delete":{"tags":["discord"],"operationId":"DiscordInventoryItem_DeleteUserToDeliveryItemLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/discord/links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links":{"post":{"tags":["discord"],"operationId":"DiscordServers_CreateDiscordServerLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/discord/links/{token}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links/{token}":{"delete":{"tags":["discord"],"operationId":"DiscordServers_DeleteDiscordServerLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/{discordServerId}/roles

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerRoleDto":{"required":["id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/{discordServerId}/roles":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerRoles","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordServerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerRoleDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/{discordServerId}/discord/text\_channels

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerChannelDto":{"required":["category","id","name"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerTextChannels","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordServerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerChannelDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paynow.gg/management/management-api/discord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
