{"openapi":"3.1.0","info":{"title":"TRS Registry Operator API Service","description":"\nA comprehensive RESTful API for TRS (Top-level Registry Service) administration and operations.\n\n## Core Capabilities\n\n### Domain Operations\n- **Domain Lifecycle Management**: Check availability, manage registrations, transfers, and renewals\n- **Domain History**: Track changes, status updates, and historical records\n- **Pending Actions**: Review and process pending domain operations\n- **IDN Support**: Full support for Internationalized Domain Names with punycode conversion\n\n### Registrar Management\n- **Account Management**: Create, update, and manage registrar accounts\n- **Balance Operations**: Track and adjust registrar account balances\n- **Accreditation**: Manage registrar credentials and authorization levels\n\n### Pricing & Promotions\n- **Pricing Configuration**: Define and manage tiered pricing structures\n- **Premium Domains**: Configure premium domain pricing and categorization\n- **Promotional Pricing**: Create and manage time-limited promotions and discounts\n- **Domain-Specific Pricing**: Set custom pricing for individual domains or groups\n\n### Trust & Safety\n- **Domain Restrictions**: Implement and manage registry-level domain restrictions\n- **Abuse Management**: Handle abuse reports and enforcement actions\n- **TLD Security**: Configure trust and safety rules for Top-Level Domains\n- **Object Groups**: Organize domains into groups for batch operations and policy enforcement\n\n### Configuration & Monitoring\n- **TLD Management**: Configure and monitor Top-Level Domain settings\n- **Contact Management**: Manage registry contacts and contact information\n- **Transaction Tracking**: Monitor and audit registry transactions\n- **Event Streams**: Real-time event consumption via RabbitMQ Streams\n- **Health & Status**: System health checks and operational status monitoring\n\n### Operations\n- **Batch Uploads**: Process bulk domain operations via CSV/batch files\n- **Authentication**: JWT-based authentication with IP binding and role-based access control\n- **Audit Logging**: Comprehensive audit trails for all write operations\n\n## Authentication\n\nAll endpoints require JWT authentication. Obtain a token via `/token/` endpoint using your credentials.\nTokens are IP-bound and expire after 24 hours.\n\n## Authorization\n\nAccess is controlled through role-based permissions:\n- `ops:ro` / `ops:rw` - Registry operations (read-only / read-write)\n- `finances:ro` / `finances:rw` - Financial operations\n- `abuse:ro` / `abuse:rw` - Abuse and trust & safety operations\n- `system:ro` / `system:rw` - System configuration\n- `upload_rw_batch` / `upload_ro_batch` - Batch upload operations\n    ","version":"1.15.1"},"paths":{"/contact/{contact_id}":{"get":{"tags":["Contacts"],"summary":"Contact Info","description":"Retrieve contact information for a given contact ID.\n\nArgs:\n    request (Request): The incoming request object.\n    user (user_auth): The user authentication object.\n    contact_id (str): The ID of the contact to retrieve information for.\n    authenticated (bool, optional): Flag indicating if the user is authenticated. Defaults to ops_ro_user.\n\nReturns:\n    APIResponse: The response containing the contact information.","operationId":"contact_info_contact__contact_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/check":{"post":{"tags":["Domains"],"summary":"Check Domain Availability","description":"Check availability of one or more domain names.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Privilege Required**: `domain:check_availability`\n\n## Description\n\nPerforms bulk domain availability checks against the registry. Supports both\nASCII and Internationalized Domain Names (IDN). IDN domains are automatically\nencoded to punycode for checking and decoded back in the response.\n\n## Request Parameters\n\n- **domains** (body, required): Array of domain names to check\n  - Supports ASCII domain names (e.g., \"example.com\")\n  - Supports IDN/Unicode domains (e.g., \"münchen.com\")\n  - No limit on number of domains per request\n- **registrar_name** (query, optional): Check as specific registrar\n  - Default: Uses registrar with IANA ID 9999\n  - Use for registrar-specific availability rules\n\n## Response Fields\n\nEach domain in the response includes:\n- **name**: Domain name (decoded from punycode if IDN)\n- **ace_name**: ASCII-compatible encoding (punycode) of the domain\n- **is_available**: Boolean indicating if domain can be registered\n- **code**: Status code indicating availability status\n- **reason**: Human-readable reason (only present when unavailable)\n\n## Availability Codes & Reasons\n\n- **0**: Domain is available for registration\n- **1**: Domain is in use (already registered)\n- **-1**: Domain is registry reserved\n- **-2**: Blocked by registry policy\n- **-3**: TLD invalid or not accessible\n- **-4**: Domain name violates registry policy\n- **-5**: Domain matches restricted word or rule\n- **-6**: Domain name is malformed\n- **-7**: Domain not available in current launch phase\n- **-8**: Domain can be applied for in restricted sunrise phase\n- **-9**: Domain matches blocked IDN variant\n- **-10**: Blocked by Uni EPS product\n- **-11**: Blocked by Unified Block product\n\n## IDN Support\n\nInternationalized domain names are automatically handled:\n- Unicode input (e.g., \"münchen.com\") → Converted to punycode for checking\n- Punycode in response (e.g., \"xn--mnchen-3ya.com\")\n- Both `name` (unicode) and `ace_name` (punycode) returned\n\n## Usage Examples\n\n### Check Multiple Domains\n```bash\ncurl -X POST \"https://api.example.com/domain/check\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\"example.com\", \"test.net\", \"available.org\"]'\n```\n\n### Check IDN Domain\n```bash\ncurl -X POST \"https://api.example.com/domain/check\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\"münchen.com\"]'\n```\n\n### Check as Specific Registrar\n```bash\ncurl -X POST \"https://api.example.com/domain/check?registrar_name=my-registrar\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\"example.com\"]'\n```","operationId":"domain_check_domain_check_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful domain availability check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"name":"example.com","ace_name":"example.com","is_available":false,"code":1,"reason":"in use"},{"name":"available-domain.com","ace_name":"available-domain.com","is_available":true,"code":0}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires domain:check_availability privilege)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/server-status/{domain}":{"patch":{"tags":["Domains"],"summary":"Update Domain Server Status","description":"Add or remove EPP server* status codes on a domain.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:rw` (Operations Read-Write)\n\n## Description\n\nManages EPP server-level status codes on domains. Server statuses are\nregistry-imposed restrictions that control domain operations like transfers,\nupdates, deletions, and DNS publication.\n\n## Path Parameters\n\n- **domain**: Full domain name (e.g., \"example.com\")\n\n## Request Body\n\nJSON object specifying statuses to add or remove:\n```json\n{\n  \"add\": [\"serverTransferProhibited\", \"serverUpdateProhibited\"],\n  \"remove\": [\"serverHold\"],\n  \"rationale\": \"Court order #2024-123\"\n}\n```\n\nFields:\n- **add** (optional): Array of status codes to add\n- **remove** (optional): Array of status codes to remove\n- **rationale** (required): Reason for the status change\n\n## Available Server Status Codes\n\n- **serverHold**: Prevents DNS publication (domain won't resolve)\n- **serverTransferProhibited**: Prevents domain transfers\n- **serverUpdateProhibited**: Prevents domain updates\n- **serverDeleteProhibited**: Prevents domain deletion\n- **serverRenewProhibited**: Prevents domain renewal\n\n## Status Effects\n\n### serverHold\n- Domain removed from DNS zone\n- No website or email resolution\n- Used for abuse suspension, non-payment, legal holds\n\n### serverTransferProhibited\n- Prevents unauthorized transfers\n- Often combined with other prohibit statuses\n- Used for security, legal holds\n\n### serverUpdateProhibited\n- Prevents changes to domain data\n- Nameservers, contacts cannot be modified\n- Used for registry locks, legal holds\n\n### serverDeleteProhibited\n- Prevents domain deletion\n- Protects high-value domains\n- Used for registry locks\n\n### serverRenewProhibited\n- Prevents domain renewal\n- Used when domain should not be renewed\n- Rare, typically for policy violations\n\n## Usage Examples\n\n```bash\n# Suspend domain for abuse (add serverHold)\ncurl -X PATCH \"https://api.example.com/domain/server-status/malicious-site.com\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"add\": [\"serverHold\"],\n    \"rationale\": \"Phishing activity reported - Ticket #12345\"\n  }'\n\n# Apply registry lock (add multiple prohibit statuses)\ncurl -X PATCH \"https://api.example.com/domain/server-status/valuable-brand.com\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"add\": [\"serverTransferProhibited\", \"serverUpdateProhibited\", \"serverDeleteProhibited\"],\n    \"rationale\": \"Brand protection - Registry lock applied\"\n  }'\n\n# Remove hold status (unsuspend domain)\ncurl -X PATCH \"https://api.example.com/domain/server-status/resolved-issue.com\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"remove\": [\"serverHold\"],\n    \"rationale\": \"Issue resolved - Ticket #12345 closed\"\n  }'\n\n# Replace statuses (remove old, add new)\ncurl -X PATCH \"https://api.example.com/domain/server-status/example.com\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"remove\": [\"serverHold\"],\n    \"add\": [\"serverTransferProhibited\"],\n    \"rationale\": \"Changed from suspension to transfer lock\"\n  }'\n```\n\n## Use Cases\n\n- **Abuse Management**: Suspend domains for abuse violations\n- **Legal Compliance**: Implement court-ordered restrictions\n- **Brand Protection**: Lock high-value trademark domains\n- **Security**: Prevent unauthorized changes or transfers\n- **Debt Collection**: Hold domains for non-payment\n\n## Important Notes\n\n- All status changes are logged with rationale\n- Status changes may trigger EPP notifications to registrar\n- serverHold immediately removes domain from DNS\n- Multiple statuses can be applied simultaneously\n- Rationale is required for audit trail\n- Only affects server* statuses (not client* statuses)","operationId":"domain_server_status_domain_server_status__domain__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainServerStatusRequest"}}}},"responses":{"200":{"description":"Server statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"server status(es) for example.com updated"}}}},"400":{"description":"Invalid status or domain"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:rw role)"},"404":{"description":"Domain not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/info/{domain}":{"get":{"tags":["Domains"],"summary":"Get Domain Information","description":"Retrieve comprehensive information about a registered domain.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nReturns complete domain information including registrant details, contacts,\nnameservers, DNSSEC configuration, EPP status codes, pricing, restrictions,\nand attributes. This is the primary endpoint for domain lookups.\n\n## Path Parameters\n\n- **domain**: Full domain name (e.g., \"example.com\")\n  - Supports ASCII and IDN domains\n  - Case-insensitive\n\n## Response Fields\n\n### Core Domain Information\n- **domain_name**: Domain name (ASCII/punycode format)\n- **domain_uname**: Unicode domain name (for IDN domains)\n- **roid**: Registry Object Identifier (unique per domain)\n- **created_date**: When domain was first registered\n- **expiry_date**: Domain expiration date\n- **renewed_date**: Last renewal date\n- **transferred_date**: Last transfer date (if transferred)\n- **password**: Auth code for transfers\n- **idn_table**: IDN table identifier (if IDN domain)\n\n### Registrar & Contacts\n- **registrar_name**: Sponsoring registrar identifier\n- **registrant**: Registrant contact object with id, email, href\n- **contacts**: Contact types with array of contact IDs\n  - admin: Administrative contacts\n  - tech: Technical contacts\n  - billing: Billing contacts (if applicable)\n\n### Nameservers & DNS\n- **servers**: Array of nameserver hostnames\n- **subordinate_hosts**: Glue records (hosts under this domain)\n- **dnssec_ds**: DNSSEC DS records with algorithm, keytag, digest\n\n### Status & Attributes\n- **statuses**: Array of EPP status codes (simple list)\n- **statuses_full**: Full status objects with rationale and dates\n- **rgp_status_name**: RGP (Redemption Grace Period) status\n  - null: Normal status\n  - \"addPeriod\", \"autoRenewPeriod\", \"redemptionPeriod\", etc.\n- **attributes**: Domain attributes array with attribute name and rationale\n  - e.g., registry_lock, server_abuse_suspension\n\n### Pricing & Restrictions\n- **price**: Object with operation prices\n  - registration: New registration price\n  - renewal: Renewal price\n  - transfer: Transfer price\n  - restore: Restore from RGP price\n- **sticky_pricing**: Special pricing that stays with domain (e.g., promos)\n- **restrictions**: Array of restrictions affecting this domain\n  - restriction_name: Name of restriction\n  - restriction_type: Type (restricted_domain, restricted_word, restricted_regexp)\n  - can_register: Whether registration is allowed\n  - prevents_publication: Whether DNS publication is prevented\n\n## EPP Status Codes\n\nCommon statuses returned:\n- **ok**: Domain is active with no restrictions\n- **clientHold**: Registrar has placed hold\n- **serverHold**: Registry has placed hold\n- **clientTransferProhibited**: Transfers blocked by registrar\n- **serverTransferProhibited**: Transfers blocked by registry\n- **pendingDelete**: Domain is pending deletion\n- **redemptionPeriod**: Domain can be restored\n\n## Usage Examples\n\n```bash\n# Get domain information\ncurl -X GET \"https://api.example.com/domain/info/example.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get IDN domain information\ncurl -X GET \"https://api.example.com/domain/info/münchen.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get premium domain with pricing\ncurl -X GET \"https://api.example.com/domain/info/premium-domain.com\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Domain Lookup**: Get full details of any registered domain\n- **Transfer Preparation**: Retrieve auth code and check transfer eligibility\n- **Status Monitoring**: Check EPP status codes and RGP status\n- **DNSSEC Verification**: Validate DNSSEC configuration\n- **Pricing Inquiries**: Determine renewal/transfer costs\n- **Compliance Auditing**: Review domain restrictions and attributes\n- **Contact Management**: Access registrant and contact information\n\n## Notes\n\n- Password (auth code) is returned in plain text - handle securely\n- DNSSEC DS records are returned if configured\n- Pricing reflects current rates for the sponsoring registrar\n- Restrictions show why a domain may be unavailable or limited\n- Sticky pricing shows promotional pricing attached to domain","operationId":"domain_info_domain_info__domain__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successfully retrieved domain information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"domain_name":"example.com","domain_uname":"example.com","created_date":"2020-01-15T10:30:00","registrar_name":"acme-registrar","registrant":{"id":"CONT-12345","email":"admin@example.com","href":"/contact/CONT-12345"},"roid":"DOMAIN123-REP","statuses":["ok"],"servers":["ns1.example.com","ns2.example.com"],"subordinate_hosts":[],"dnssec_ds":[],"contacts":{"admin":["CONT-12346"],"tech":["CONT-12347"]},"expiry_date":"2025-01-15T10:30:00","attributes":[],"price":{"registration":10.0,"renewal":10.0,"transfer":10.0},"restrictions":[]}]}}}},"404":{"description":"Domain not found"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/dums":{"get":{"tags":["Domains"],"summary":"Dums","description":"Domains under management count by tld.\n\nIf the `to_date` parameter is skipped, NOW() will be used instead.","operationId":"dums_domain_dums_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/purge/{domain}":{"delete":{"tags":["Domains"],"summary":"Purge","description":"Purge a domain\n\nThis is only possible when the domain is in *redemptionPeriod*, which means\nthat the domain must have been previously deleted by the registrar via EPP\nor the registrar console before it can be purged.","operationId":"purge_domain_purge__domain__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/pricing/{domain}":{"get":{"tags":["Domains"],"summary":"Get Domain Pricing","description":"Get pricing for all operations available for a specific domain.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nReturns comprehensive pricing information for all domain operations including\nregistration, renewal, transfer, and restore. Pricing can vary by registrar,\nTLD, domain tier (standard/premium), and date. Supports historical and future\npricing queries.\n\n## Path Parameters\n\n- **domain**: Domain name to query pricing for (e.g., \"example.com\")\n  - Pricing varies by TLD and domain tier\n  - Premium domains have higher pricing\n  - IDN domains supported\n\n## Query Parameters\n\n- **registrar_name** (optional): Get pricing for specific registrar\n  - Default: Uses registrar with IANA ID 9999\n  - Different registrars may have custom pricing\n- **when** (optional): Date/time for pricing lookup\n  - ISO 8601 format (date or datetime)\n  - Allows checking historical pricing\n  - Allows checking future scheduled pricing\n  - Default: Current date/time\n\n## Response Fields\n\nEach operation includes:\n- **id**: Operation identifier\n- **type**: Operation category (domain, contact, etc.)\n- **operation**: Operation type (registration, renewal, transfer)\n- **name**: Operation code (domreg, domren, domtrn, etc.)\n- **description**: Human-readable operation description\n- **price**: Price for this operation (in currency units)\n- **enabled**: Whether operation is available\n- **per_year**: Whether price is per year\n- **per_month**: Whether price is per month\n- **is_discount**: Whether this is a discount/credit\n- **tier**: Pricing tier (standard, premium-tier-1, etc.)\n- **is_rgp_refundable**: Whether refundable if domain enters RGP\n- **is_tax**: Whether this is a tax charge\n\n## Common Operations\n\n- **domreg** (registration): Register new domain\n- **domren** (renewal): Renew existing domain\n- **domtrn** (transfer): Transfer domain in\n- **domres** (restore): Restore from RGP (redemption period)\n- **domprm** (premium): Premium domain fee\n- **domdel** (deletion): Domain deletion (typically free)\n\n## Pricing Tiers\n\n- **standard**: Regular domain pricing\n- **premium-tier-1**, **premium-tier-2**, etc.: Premium domain tiers\n- **promotional**: Promotional pricing\n- Custom tiers defined per registry\n\n## Usage Examples\n\n```bash\n# Get current pricing for a domain\ncurl -X GET \"https://api.example.com/domain/pricing/example.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get pricing for premium domain\ncurl -X GET \"https://api.example.com/domain/pricing/premium-domain.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get pricing for specific registrar\ncurl -X GET \"https://api.example.com/domain/pricing/example.com?registrar_name=acme-registrar\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Check historical pricing (as of Jan 1, 2023)\ncurl -X GET \"https://api.example.com/domain/pricing/example.com?when=2023-01-01\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Check future pricing (scheduled price increase)\ncurl -X GET \"https://api.example.com/domain/pricing/example.com?when=2025-06-01\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Cost Estimation**: Calculate costs for domain operations\n- **Price Shopping**: Compare pricing across registrars\n- **Budget Planning**: Forecast renewal costs\n- **Premium Domain Valuation**: Determine premium domain pricing\n- **Historical Analysis**: Review past pricing changes\n- **Future Planning**: Check scheduled price increases\n- **Invoice Validation**: Verify billing accuracy\n\n## Pricing Rules\n\n1. **Hierarchy**: Most specific pricing wins\n   - Domain-specific > Registrar-specific > TLD-specific > Global\n2. **Premium Domains**: Higher pricing based on tier\n3. **Promotional Pricing**: May apply time-limited discounts\n4. **Scheduled Changes**: Pricing can change at specific dates\n5. **RGP Pricing**: Restore operations have special pricing\n\n## Notes\n\n- Pricing is returned in the registry's base currency\n- Premium domains have multiple tiers with different pricing\n- Promotional pricing is time-limited and tracked separately\n- RGP refundable flag indicates if fees are refunded on restore\n- Disabled operations (enabled=false) cannot be performed\n- Per-year vs per-month indicates billing frequency","operationId":"pricing_domain_pricing__domain__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"when","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"When"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}}],"responses":{"200":{"description":"Successfully retrieved domain pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":1,"type":"domain","operation":"registration","name":"domreg","description":"Domain Registration","price":10.0,"enabled":true,"per_year":true,"per_month":false,"is_discount":false,"tier":"standard","is_rgp_refundable":false,"is_tax":false},{"id":2,"type":"domain","operation":"renewal","name":"domren","description":"Domain Renewal","price":10.0,"enabled":true,"per_year":true,"per_month":false,"is_discount":false,"tier":"standard","is_rgp_refundable":false,"is_tax":false}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/deletes":{"post":{"tags":["Domains"],"summary":"Deletes","description":"Returns the list of deleted domains during the selected\nperiod.\n\nTimes are considered in UTC format. When filtering, do not specify the time zone.\ni.e.: `2024-12-01T00:00:00` instead of `2024-12-01T00:00:00Z`","operationId":"deletes_domain_deletes_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DeletedDomain"},{"type":"null"}],"default":"deleted_date","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredDeletedDomain"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/contacts":{"get":{"tags":["Domains"],"summary":"Contacs","description":"Returns the contact information for a domain name","operationId":"contacs_domain_contacts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/restores":{"get":{"tags":["Domains"],"summary":"Restores","description":"Restored domains\nIf the `to_date` parameter is skipped, NOW() will be used instead.","operationId":"restores_domain_restores_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/by_status":{"get":{"tags":["Domains"],"summary":"By Status","description":"List domains according to their status\n\nProvide information on domains set into an EPP status that prevents DNS\npublication along with any rationale available in the SRS.\n\nIf date parameters are not provided, no filtering is performed.","operationId":"by_status_domain_by_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/suspended":{"get":{"tags":["Domains"],"summary":"Suspended","description":"Trust and Safety: List suspended domains\n\nProvide information on domains set into an EPP status that prevents DNS\npublication along with any rationale available in the SRS.\n\nIf date parameters are not provided, no filtering is performed.","operationId":"suspended_domain_suspended_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/newly_registered":{"get":{"tags":["Domains"],"summary":"Newly Registered","description":"List newly registered names within a date range.\n\nBy default, domains registered in the last 5 days are listed.\n\nAccess is gated by one of two privileges:\n\n* ``domain:view_newly_registered_full`` — returns the full response\n  (``created_date``, ``domain_name``, ``domain_roid``, ``registrar_name``,\n  ``registrant``, ``statuses``, ``rationales``) and accepts all four\n  filters (``from_date``, ``to_date``, ``tld_name``, ``registrar_name``).\n* ``domain:view_newly_registered_limited`` — returns only ``domain_name``\n  and ``created_date``. The ``registrar_name`` filter is rejected with\n  HTTP 400. Intended for external API users who only need the domain list.\n\nIf a user holds both privileges the full response is served. Users with\nneither privilege receive HTTP 403.","operationId":"newly_registered_domain_newly_registered_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/transfer":{"post":{"tags":["Domains"],"summary":"Post Transfers","description":"Post a new Domain Transfer request","operationId":"post_transfers_domain_transfer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"losing_registrar","in":"query","required":false,"schema":{"type":"string","title":"Losing Registrar"}},{"name":"gaining_registrar","in":"query","required":false,"schema":{"type":"string","title":"Gaining Registrar"}},{"name":"domain_name","in":"query","required":false,"schema":{"type":"string","title":"Domain Name"}},{"name":"renew","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Renew"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Domains"],"summary":"Put Transfers","description":"Update a new Domain Transfer request\n\nSet the status for an ongoing domain transfer","operationId":"put_transfers_domain_transfer_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"transfer_status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TransferStatus","default":"serverApproved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/transfers":{"get":{"tags":["Domains"],"summary":"Transfers","description":"Domain Transfers","operationId":"transfers_domain_transfers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"losing_registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Losing Registrar"}},{"name":"gaining_registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gaining Registrar"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TransferStatusFilter"},{"type":"null"}],"title":"Status"}},{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/history":{"post":{"tags":["Domains"],"summary":"History","description":"Retrieve the domain history.\n\nEither a domain name or a ROID must be provided.","operationId":"history_domain_history_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"domain_roid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Roid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DomainHistory"},{"type":"null"}],"default":"event_date","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredDomainHistory"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/supervisor-history":{"get":{"tags":["Domains"],"summary":"Supervisor History","description":"Retrieve domain changes performed by a supervisor registrar.\n\nReturns every domain-level operation a supervisor registrar (e.g.\n``zdns_supr``) performed on behalf of its subordinate registrars within a\ndate/time period, across all domains.\n\n## Query Parameters\n\n- **supervisor** (required): the supervisor registrar that performed the changes.\n- **from_date** (required): start of the period, inclusive (ISO 8601).\n- **to_date** (optional): end of the period, exclusive; defaults to now.\n- **domain_name** (optional): narrow the results to a single domain.\n\n## Response Fields\n\nEach row is a single supervisor-performed change:\n- **domain**: the affected domain name.\n- **supervisor**: the supervisor that performed the change.\n- **registrar**: the registrar the change was performed on behalf of.\n- **action**: an object describing the operation:\n    - **operation**: the EPP operation (e.g. ``update``, ``delete``).\n    - **server_transaction_id** / **client_transaction_id**: EPP transaction IDs.\n    - **changes**: normalized list of ``{op, field, value}`` entries flattened\n      from the command payload's add/rem/chg blocks; empty for operations\n      with no field changes (e.g. delete).\n- **timestamp**: when the change was performed.","operationId":"supervisor_history_domain_supervisor_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"supervisor","in":"query","required":true,"schema":{"type":"string","title":"Supervisor"}},{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/pending/list":{"post":{"tags":["Domains"],"summary":"Pending List","description":"List pending domains\n\nProvide a list of domain names that require approval before the requests\ncan be processed.","operationId":"pending_list_domain_pending_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PendingDomainList"},{"type":"null"}],"default":"created_date","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPendingDomainList"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/pending/{roid}":{"patch":{"tags":["Domains"],"summary":"Pending Action","description":"Approve or reject a pending domain request","operationId":"pending_action_domain_pending__roid__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"roid","in":"path","required":true,"schema":{"type":"string","title":"Roid"}},{"name":"action","in":"query","required":true,"schema":{"$ref":"#/components/schemas/PendingDomainAction"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/attributes/":{"delete":{"tags":["Domain Attributes"],"summary":"Delete Domain Attributes","description":"Delete Domain Attributes\n\nDelete existing domain attribute","operationId":"delete_domain_attributes_domain_attributes__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Domain Attributes"],"summary":"List Domain Attributes","description":"List all domain attributes or fetch a specific attribute by name.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nDomain attributes define special properties that can be applied to domains.\nThese attributes control EPP server status flags, publication behavior, and\nother domain-level restrictions.\n\n## Query Parameters\n\n- **attribute_name** (optional): Filter by specific attribute name\n  - If omitted, returns all attributes\n  - If provided, returns only the matching attribute\n\n## Response Fields\n\nEach attribute includes:\n- **name**: Unique attribute identifier\n- **description**: Human-readable description of the attribute\n- **add_server_hold**: If true, prevents domain from being published in DNS\n- **add_server_delete_prohibited**: If true, adds serverDeleteProhibited EPP status\n- **add_server_renew_prohibited**: If true, adds serverRenewProhibited EPP status\n- **add_server_transfer_prohibited**: If true, adds serverTransferProhibited EPP status\n- **add_server_update_prohibited**: If true, adds serverUpdateProhibited EPP status\n- **tld_list**: Array of TLDs where this attribute is applicable\n\n## Common Attributes\n\n- **high-risk**: Domains flagged for abuse/security concerns\n- **legal-hold**: Domains subject to legal proceedings\n- **reserved**: Registry-reserved domains\n- **premium**: Premium pricing tier domains\n\n## Usage Example\n\n```bash\n# List all attributes\ncurl -X GET \"https://api.example.com/domain_attributes/\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get specific attribute\ncurl -X GET \"https://api.example.com/domain_attributes/?attribute_name=high-risk\" \\\n  -H \"Authorization: Bearer <token>\"\n```","operationId":"get_domain_attributes_domain_attributes__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attribute_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribute Name"}}],"responses":{"200":{"description":"Successfully retrieved domain attributes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"name":"high-risk","description":"Domain flagged for high-risk activity","add_server_hold":true,"add_server_delete_prohibited":false,"add_server_renew_prohibited":false,"add_server_transfer_prohibited":true,"add_server_update_prohibited":false,"tld_list":["com","net","org"]}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Domain Attributes"],"summary":"Save Domain Attributes","description":"Post Domain Attributes\n\nCreates a new domain attribute","operationId":"save_domain_attributes_domain_attributes__post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainAttribute"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Domain Attributes"],"summary":"Save Domain Attributes","description":"Post Domain Attributes\n\nCreates a new domain attribute","operationId":"save_domain_attributes_domain_attributes__put","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainAttribute"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/domain/attributes/maps":{"delete":{"tags":["Domain Attributes"],"summary":"Delete Domain Attributes Maps","description":"Delete Domain Attribute to domain assignments\n\nThis operation only affects attribute mappings that are valid according to their time constraints.","operationId":"delete_domain_attributes_maps_domain_attributes_maps_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain_name","in":"query","required":true,"schema":{"type":"string","title":"Domain Name"}},{"name":"attribute_name","in":"query","required":true,"schema":{"type":"string","title":"Attribute Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Domain Attributes"],"summary":"List Domain Attribute Mappings","description":"List attribute-to-domain mappings (assignments).\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves the current assignments of attributes to domains. Only returns\nmappings that are currently active based on their date range constraints.\n\n## Query Parameters\n\n- **domain_name** (optional): Filter by specific domain name\n- **attribute_name** (optional): Filter by specific attribute name\n- **page** (optional): Page number for pagination (default: 1)\n- **rows** (optional): Results per page (default: 100)\n\n## Response Fields\n\nEach mapping includes:\n- **domain_name**: The domain this attribute is assigned to\n- **attribute_name**: The attribute assigned to the domain\n- **rationale**: Reason for the assignment (e.g., \"Court order\", \"Abuse report\")\n- **from_date**: Start of validity period (null = no start constraint)\n- **to_date**: End of validity period (null = no end constraint)\n\n## Date Range Behavior\n\n- Only returns mappings that are valid at the current time\n- `from_date` and `to_date` define when the mapping is active\n- null dates mean unbounded (from_date=null: valid from beginning of time)\n\n## Use Cases\n\n- **Audit**: Review which domains have special restrictions\n- **Monitoring**: Track high-risk domain flagging\n- **Compliance**: Verify legal hold implementations\n- **Reporting**: Generate lists of domains by attribute type\n\n## Usage Examples\n\n```bash\n# List all mappings\ncurl -X GET \"https://api.example.com/domain_attributes/maps\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Find all attributes for a domain\ncurl -X GET \"https://api.example.com/domain_attributes/maps?domain_name=example.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Find all domains with an attribute\ncurl -X GET \"https://api.example.com/domain_attributes/maps?attribute_name=high-risk\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Combined filter\ncurl -X GET \"https://api.example.com/domain_attributes/maps?domain_name=example.com&attribute_name=high-risk\" \\\n  -H \"Authorization: Bearer <token>\"\n```","operationId":"get_domain_attributes_maps_domain_attributes_maps_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"attribute_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribute Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successfully retrieved attribute mappings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"domain_name":"example.com","attribute_name":"high-risk","rationale":"Flagged for phishing activity","from_date":"2024-01-01T00:00:00","to_date":"2024-12-31T23:59:59"}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Domain Attributes"],"summary":"Create Domain Attributes Maps","description":"Assign an attribute to a domain name","operationId":"create_domain_attributes_maps_domain_attributes_maps_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain_name","in":"query","required":true,"schema":{"type":"string","title":"Domain Name"}},{"name":"attribute_name","in":"query","required":true,"schema":{"type":"string","title":"Attribute Name"}},{"name":"rationale","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Domain Attributes"],"summary":"Update Domain Attributes Maps","description":"Update a Domain Attribute to domain assignment","operationId":"update_domain_attributes_maps_domain_attributes_maps_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"domain_name","in":"query","required":true,"schema":{"type":"string","title":"Domain Name"}},{"name":"attribute_name","in":"query","required":true,"schema":{"type":"string","title":"Attribute Name"}},{"name":"rationale","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/host/{host_name}":{"get":{"tags":["Hosts"],"summary":"Host Info","description":"Retrieve host information for a given host name.\n\nArgs:\n    request (Request): The incoming request object.\n    user (user_auth): The user authentication object.\n    host_name (str): The name of the host to retrieve information for.\n    authenticated (bool, optional): Flag indicating if the user is authenticated. Defaults to ops_ro_user.\n\nReturns:\n    APIResponse: The response containing the host information.","operationId":"host_info_host__host_name__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"host_name","in":"path","required":true,"schema":{"type":"string","title":"Host Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/object/groups":{"get":{"tags":["Object Management"],"summary":"List Object Groups","description":"List object groups used for domain pricing and categorization.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nObject groups are containers that organize domains into pricing tiers or\ncategories. They're commonly used for premium domain pricing, where domains\nin the same group share the same pricing configuration.\n\n## Query Parameters\n\n- **id** (optional): Filter by specific group ID\n- **name** (optional): Filter by specific group name\n- **page** (optional): Page number (default: 1)\n- **rows** (optional): Results per page (default: 100)\n\n## Response Fields\n\nEach group includes:\n- **id**: Unique group identifier\n- **name**: Group name (used in pricing configurations)\n- **description**: Human-readable group description\n\n## Common Use Cases\n\n- **Premium Tiers**: Create groups for different premium pricing levels (tier-1, tier-2, etc.)\n- **Category Pricing**: Group domains by category (geo, numeric, short, etc.)\n- **Promotional Groups**: Organize domains for special promotions\n- **Batch Operations**: Apply operations to all domains in a group\n\n## Usage Examples\n\n```bash\n# List all groups\ncurl -X GET \"https://api.example.com/objects/groups\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get specific group by ID\ncurl -X GET \"https://api.example.com/objects/groups?id=1\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Get specific group by name\ncurl -X GET \"https://api.example.com/objects/groups?name=premium-tier-1\" \\\n  -H \"Authorization: Bearer <token>\"\n```","operationId":"get_groups_object_groups_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successfully retrieved object groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":1,"name":"premium-tier-1","description":"Premium domains tier 1 pricing group"},{"id":2,"name":"premium-tier-2","description":"Premium domains tier 2 pricing group"}],"pager":{"total_entries":10,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/object/group":{"post":{"tags":["Object Management"],"summary":"Create Object Group","description":"Create a new object group for domain categorization and pricing.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:rw` (Operations Read-Write)\n\n## Description\n\nCreates a new object group that can be used to organize domains for pricing\nor other batch operations. After creating a group, you can add domain members\nto it using POST /objects/group/entry.\n\n## Query Parameters\n\n- **name** (required): Unique group identifier\n  - Used in API calls and pricing configurations\n  - Recommend using kebab-case (e.g., \"premium-tier-1\")\n- **description** (required): Human-readable group description\n  - Explains the purpose of the group\n\n## Workflow\n\n1. **Create Group**: Use this endpoint to create the container\n2. **Add Members**: Use POST /objects/group/entry to add domains\n3. **Configure Pricing**: Associate group with pricing rules\n4. **Manage**: Add/remove members as needed\n\n## Usage Examples\n\n```bash\n# Create a premium pricing tier group\ncurl -X POST \"https://api.example.com/objects/group?name=premium-tier-1&description=Top+tier+premium+domains\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Create a geographic category group\ncurl -X POST \"https://api.example.com/objects/group?name=geo-domains&description=Geographic+location+domains\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Create a promotional group\ncurl -X POST \"https://api.example.com/objects/group?name=black-friday-2024&description=Black+Friday+promotional+domains\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Premium Tiers**: Create groups for different premium price points\n- **Category Management**: Organize domains by type (geo, numeric, short, etc.)\n- **Promotional Pricing**: Group domains for time-limited promotions\n- **Batch Operations**: Apply bulk changes to grouped domains","operationId":"post_group_object_group_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"type":"string","title":"Description"}}],"responses":{"200":{"description":"Group created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":3}]}}}},"400":{"description":"Missing required fields (name or description)"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:rw role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Object Management"],"summary":"Put Group","description":"Update object group set\n\nObject groups are containers used to manage rating and other types of\noperations within the registry.","operationId":"put_group_object_group_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"type":"string","title":"Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Object Management"],"summary":"Delete Group","description":"Delete empty object group set\n\nObject groups are containers used to manage rating and other types of\noperations within the registry.","operationId":"delete_group_object_group_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/object/group/entries":{"get":{"tags":["Object Management"],"summary":"Get Group Entries","description":"List existing object group entries\n\nFor a given object group, provide a detailed listing of all entries\npresent.\n\nMust specify either group_id or group_name.","operationId":"get_group_entries_object_group_entries_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"}},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/object/group/entry":{"delete":{"tags":["Object Management"],"summary":"Delete Group Entry","description":"Delete an object group member entry\n\nMust specify either group_id or group_name, and the value to remove.","operationId":"delete_group_entry_object_group_entry_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"}},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}},{"name":"value","in":"query","required":false,"schema":{"type":"string","title":"Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Object Management"],"summary":"Post Group Entry","description":"Create a new object group entry\n\nMust specify either group_id or group_name.","operationId":"post_group_entry_object_group_entry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"string","title":"Value"}},{"name":"group_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"}},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/config":{"post":{"tags":["Pricing"],"summary":"List Pricing Configurations","description":"List pricing configurations with advanced filtering and sorting.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves pricing configurations for domain operations across TLDs and registrars.\nPricing can be configured globally, per-TLD, per-registrar, or per-registrar-per-TLD.\nSupports advanced filtering and sorting for pricing management.\n\n## Request Body\n\nPOST body accepts JSON array of filter objects. Each filter contains:\n- **field**: Field name to filter on\n- **operator**: Comparison operator (eq, ne, lt, le, gt, ge, like, in, etc.)\n- **value**: Value to compare against\n\n## Response Fields\n\nEach pricing configuration includes:\n- **id**: Unique pricing configuration identifier\n- **tld_name**: TLD this pricing applies to (null = all TLDs)\n- **registrar_name**: Registrar this pricing applies to (null = all registrars)\n- **operation_name**: Operation code (domreg, domren, domtrn, etc.)\n- **operation_description**: Human-readable operation description\n- **price**: Price for this operation\n- **since_date**: Start date of pricing validity (null = from beginning)\n- **until_date**: End date of pricing validity (null = no expiration)\n\n## Pricing Hierarchy\n\nWhen multiple pricing configs match, the most specific one applies:\n1. Registrar + TLD specific (highest priority)\n2. Registrar specific\n3. TLD specific\n4. Global default (lowest priority)\n\n## Usage Examples\n\n```bash\n# List all pricing configurations\ncurl -X POST \"https://api.example.com/pricing/config\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[]'\n\n# Filter by TLD\ncurl -X POST \"https://api.example.com/pricing/config\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"tld_name\",\n      \"operator\": \"eq\",\n      \"value\": \"com\"\n    }\n  ]'\n\n# Filter by registrar and operation\ncurl -X POST \"https://api.example.com/pricing/config\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"registrar_name\",\n      \"operator\": \"eq\",\n      \"value\": \"acme-registrar\"\n    },\n    {\n      \"field\": \"operation_name\",\n      \"operator\": \"eq\",\n      \"value\": \"domreg\"\n    }\n  ]'\n```\n\n## Use Cases\n\n- **Pricing Review**: Audit current pricing across TLDs and registrars\n- **Price Updates**: Identify configurations needing updates\n- **Cost Analysis**: Analyze pricing structures for financial planning\n- **Registrar Comparison**: Compare pricing across different registrars","operationId":"get_pricing_config_pricing_config_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PricingConfig"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPricingConfig"}},{"type":"null"}],"title":"Filtered Pricing Config"}}}},"responses":{"200":{"description":"Successfully retrieved pricing configurations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":123,"tld_name":"com","registrar_name":"acme-registrar","operation_name":"domreg","operation_description":"Domain Registration","price":10.0,"since_date":"2024-01-01T00:00:00"}],"pager":{"total_entries":50,"entries_per_page":100,"current_page":1}}}}},"400":{"description":"Invalid filter or sort parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Pricing"],"summary":"Create or Update Pricing Configuration","description":"Create or update a pricing configuration for domain operations.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:rw` (Operations Read-Write)\n\n## Description\n\nCreates a new pricing configuration or updates an existing one. Pricing can be\nconfigured at different levels of specificity:\n- **Global**: No TLD or registrar specified (default for all)\n- **TLD-specific**: TLD specified, no registrar (applies to all registrars for this TLD)\n- **Registrar-specific**: Registrar specified, no TLD (applies to all TLDs for this registrar)\n- **Registrar-TLD-specific**: Both specified (highest priority, most specific)\n\n## Query Parameters\n\n- **price** (required): Price for the operation (float, e.g., 10.50)\n- **operation_id** (required): Operation ID (see GET /pricing/operations for list)\n  - Common operations:\n    - Registration (domreg)\n    - Renewal (domren)\n    - Transfer (domtrn)\n    - Restore (domres)\n- **registrar_name** (optional): Registrar identifier (null = all registrars)\n- **tld_name** (optional): TLD name (null = all TLDs)\n- **since_date** (optional): Start date of validity (ISO 8601, null = from beginning)\n- **until_date** (optional): End date of validity (ISO 8601, null = no expiration)\n\n## Date-Based Pricing\n\nYou can configure future pricing changes by setting `since_date` and `until_date`:\n- **Current pricing**: Omit both dates\n- **Scheduled increase**: Set `since_date` to future date\n- **Temporary promotion**: Set both dates for time-limited pricing\n- **Price history**: Create overlapping configs with different date ranges\n\n## Usage Examples\n\n```bash\n# Set global registration price for all TLDs and registrars\ncurl -X PUT \"https://api.example.com/pricing/config?price=10.00&operation_id=1\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Set .com registration price for all registrars\ncurl -X PUT \"https://api.example.com/pricing/config?price=9.50&operation_id=1&tld_name=com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Set .com registration price for specific registrar\ncurl -X PUT \"https://api.example.com/pricing/config?price=8.75&operation_id=1&tld_name=com&registrar_name=acme-registrar\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Schedule future price increase\ncurl -X PUT \"https://api.example.com/pricing/config?price=12.00&operation_id=1&tld_name=com&since_date=2025-01-01T00:00:00Z\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Temporary promotional pricing\ncurl -X PUT \"https://api.example.com/pricing/config?price=7.99&operation_id=1&tld_name=com&since_date=2024-11-01T00:00:00Z&until_date=2024-12-31T23:59:59Z\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Price Updates**: Update standard pricing across TLDs\n- **Registrar Pricing**: Set custom pricing for specific registrars\n- **Promotions**: Create time-limited promotional pricing\n- **Future Planning**: Schedule price changes in advance\n- **Volume Pricing**: Different prices for different registrar tiers","operationId":"update_pricing_config_pricing_config_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"price","in":"query","required":true,"schema":{"type":"number","title":"Price"}},{"name":"operation_id","in":"query","required":true,"schema":{"type":"integer","title":"Operation Id"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"until_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until Date"}}],"responses":{"200":{"description":"Pricing configuration created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[]}}}},"400":{"description":"Invalid parameters or validation error"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:rw role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/config/{id}":{"delete":{"tags":["Pricing"],"summary":"Delete Pricing Config","description":"Delete pricing config","operationId":"delete_pricing_config_pricing_config__id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/tiers":{"get":{"tags":["Pricing"],"summary":"Get Tiers","description":"Get all active tiers","operationId":"get_tiers_pricing_tiers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/operations":{"get":{"tags":["Pricing"],"summary":"List Billing Operations","description":"List all available billing operations.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves the complete list of billing operations that can be configured\nfor pricing. Each operation represents a billable action in the registry system.\n\n## Response Fields\n\nEach operation includes:\n- **id**: Unique operation identifier (used in pricing configuration)\n- **type**: Operation category (domain, contact, etc.)\n- **operation**: Operation type (registration, renewal, transfer, etc.)\n- **name**: Short operation code (domreg, domren, domtrn, etc.)\n- **description**: Human-readable operation description\n- **per_year**: Whether operation is billed per year\n- **per_month**: Whether operation is billed per month\n\n## Common Operations\n\n- **domreg**: Domain Registration\n- **domren**: Domain Renewal\n- **domtrn**: Domain Transfer\n- **domres**: Domain Restore\n- **domrep**: Domain Restore with Explicit Renewal\n- **domprm**: Premium Domain Fee\n- **domdel**: Domain Deletion\n\n## Usage Example\n\n```bash\n# List all operations\ncurl -X GET \"https://api.example.com/pricing/operations\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Pricing Setup**: Get operation IDs for pricing configuration\n- **Reference Data**: Display operation names in user interfaces\n- **Validation**: Validate operation codes before API calls\n- **Documentation**: Generate operation lists for documentation","operationId":"get_operations_pricing_operations_get","responses":{"200":{"description":"Successfully retrieved operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":1,"type":"domain","operation":"registration","name":"domreg","description":"Domain Registration","per_year":true,"per_month":false},{"id":2,"type":"domain","operation":"renewal","name":"domren","description":"Domain Renewal","per_year":true,"per_month":false}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/pricing/sticky-price":{"patch":{"tags":["Pricing"],"summary":"Sticky Price Update","description":"Update sticky pricing for domains","operationId":"sticky_price_update_pricing_sticky_price_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"}},{"name":"survives_transfer","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Survives Transfer"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StickyOperationType"},{"type":"null"}],"title":"Operation"}},{"name":"validity_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validity Start"}},{"name":"validity_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validity End"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Pricing"],"summary":"Sticky Price Create","description":"Create a new sticky price for a domain, with the given price, operation, and validity range.\n\nThe validity range is inclusive of the start date and exclusive of the end date.\n\nThe parameters are as follow:\n\n* domain: The domain name for which the sticky price is being set.\n* price: The price for the domain.\n* survives_transfer: Whether the price survives a transfer.\n* operation: The operation for which the price is being set, usually one of 'renew', or 'transfer'.","operationId":"sticky_price_create_pricing_sticky_price_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"price","in":"query","required":true,"schema":{"type":"number","title":"Price"}},{"name":"survives_transfer","in":"query","required":true,"schema":{"type":"boolean","title":"Survives Transfer"}},{"name":"operation","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StickyOperationType","default":"renew"}},{"name":"validity_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validity Start"}},{"name":"validity_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validity End"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/sticky-price/delete":{"post":{"tags":["Pricing"],"summary":"Sticky Price Delete","operationId":"sticky_price_delete_pricing_sticky_price_delete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StickyOperationType"},{"type":"null"}],"title":"Operation"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/sticky-price/list":{"post":{"tags":["Pricing"],"summary":"Sticky Price List","description":"List all sticky prices for domains","operationId":"sticky_price_list_pricing_sticky_price_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StickyColumns"},{"type":"null"}],"default":"created_date","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredStickyColumns"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/sticky-price/check":{"post":{"tags":["Pricing"],"summary":"Sticky Price Check","description":"Check if a sticky price exists for a domain","operationId":"sticky_price_check_pricing_sticky_price_check_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StickyOperationType"},{"type":"null"}],"title":"Operation"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/domain-specific":{"patch":{"tags":["Pricing"],"summary":"Update Domain Specific Pricing","description":"Update domain specific pricing for a list of domains","operationId":"update_domain_specific_pricing_pricing_domain_specific_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"registration_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Registration Price"}},{"name":"renewal_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Renewal Price"}},{"name":"transfer_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Transfer Price"}},{"name":"premium_fee","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Premium Fee"}},{"name":"restore_autorenew","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Restore Autorenew"}},{"name":"restore_fee","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Restore Fee"}},{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"until_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Pricing"],"summary":"Create Domain Specific Pricing","description":"Create a domain specific pricing","operationId":"create_domain_specific_pricing_pricing_domain_specific_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"registration_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Registration Price"}},{"name":"renewal_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Renewal Price"}},{"name":"transfer_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Transfer Price"}},{"name":"premium_fee","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Premium Fee"}},{"name":"restore_autorenew","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Restore Autorenew"}},{"name":"restore_fee","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Restore Fee"}},{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"until_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/domain-specific/delete":{"post":{"tags":["Pricing"],"summary":"Delete Domain Specific Pricing","description":"Delete domain specific pricing for a list of domains\nwho share the same since_date and until_date","operationId":"delete_domain_specific_pricing_pricing_domain_specific_delete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"until_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Domains"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/domain-specific/list":{"post":{"tags":["Pricing"],"summary":"Get Domain Specific Pricing","description":"Get the domain specific pricing for a list of domains\n\nOnly prices that are set as domain specific prices are returned; the\nother price columns are NULL. The underlying view falls back to tld\npricing and the operation default and does not know about rule-based\nor group (premium tier) pricing, so the fallback value could differ\nfrom the price actually charged (TRS-5682).","operationId":"get_domain_specific_pricing_pricing_domain_specific_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DomainSpecicicPricing"},{"type":"null"}],"default":"domain_name","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DomainSpecificPricingFiltered"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/premiums":{"post":{"tags":["Pricing"],"summary":"List Premiums","description":"List non-standard priced domains via explicit pricing rules\n\nProvide a list of premium domain names with their associated\npricing.\n\nIf there is no custom pricing configured for a domain or group\nof domains, the tld pricing will be returned for that operation,\nand if there is no custom tld pricing configured the default\nwill be returned instead.\n\nThe report will contain the following fields:\n\n* **type**: domain-pricing or domain-group-pricing\n* **tld_name**: the TLD name\n* **domain_name**: the domain name\n* **tier_name**: the pricing tier\n* **from_date**: the start date for the pricing\n* **to_date**: the end date for the pricing\n* **registration**: the registration price\n* **renewal**: the renewal price\n* **restore_autorenew**: the restore autorenew price\n* **transfer**: the transfer price\n* **premium_fee**: the premium fee\n* **active**: whether the pricing is currently active","operationId":"list_premiums_pricing_premiums_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PremiumFields"},{"type":"null"}],"default":"domain_name","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPremium"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing/refresh-status":{"get":{"tags":["Pricing"],"summary":"Materialized view refresh status","description":"Report how current each registry materialized view is, so an API\nconsumer can tell whether the data behind it (e.g. the\n/pricing/premiums and /pricing/domain-specific/list pivots) may be\nbriefly stale.\n\nThe state of each view is derived from the `matview_refresh` dirty\nregistry (delta 00642) plus the refresher's advisory lock:\n\n* **refreshing** -- a refresh is running right now (the refresher\n  holds the per-view advisory lock, held across the REFRESH).\n* **pending** -- no refresh is running, but at least one source\n  change has been marked dirty and awaits the next ry-op cycle.\n* **current** -- nothing is pending; the view reflects every source\n  write so far.\n\nFields per view:\n\n* **view_name**: the qualified materialized view name\n* **state**: `refreshing`, `pending`, or `current` (see above)\n* **pending_events**: dirty marks waiting for a refresh\n* **last_refreshed_at**: when the last completed refresh finished\n* **last_refresh_ms**: duration of that refresh, in milliseconds\n* **last_invalidated_at**: when the most recent source change (mark)\n  landed, whatever its state","operationId":"get_refresh_status_pricing_refresh_status_get","responses":{"200":{"description":"Successfully retrieved refresh status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"view_name":"isc_srs.mv_domain_pricing_pivot","state":"current","pending_events":0,"last_refreshed_at":"2026-11-11T15:04:12.123456+00:00","last_refresh_ms":812,"last_invalidated_at":"2026-11-11T14:55:03.987654+00:00"}]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient privileges"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/promo/by-tld/{tld}":{"get":{"tags":["Promotions"],"summary":"List By Tld","description":"Retrieve a list of promos based on the specified criteria.\n\nArgs:\n    request (Request): The incoming request object.\n    user (user_auth): The user authentication object.\n    tld (str): The top-level domain name.\n    running (bool, optional): Filter for running promos. Defaults to False.\n    finished (bool, optional): Filter for finished promos. Defaults to False.\n    scheduled (bool, optional): Filter for scheduled promos. Defaults to False.\n    authenticated (bool, optional): Flag indicating if the user is authenticated. Defaults to ops_ro_user.\n\nReturns:\n    APIResponse: The response containing the list of promos.\n\nRaises:\n    HTTPException: If none or more than one filter option is enabled.","operationId":"list_by_tld_promo_by_tld__tld__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"running","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Running"}},{"name":"finished","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Finished"}},{"name":"scheduled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Scheduled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Promotions"],"summary":"Create","description":"Create a new promotion.\n\n### Parameters:\n- promo (PromoCreate): The data for the new promotion.\n- tld (str): The top-level domain for the promotion.\n\n### Promo data must include a JSON document the following fields:\n* **name** (str): The name of the promotion.\n* **description** (str): The description of the promotion.\n* **starts** (datetime): The start date and time of the promotion, must be in UTC and in the format `YYYY-MM-DDTHH:MM:SSZ`, and must be in the future for at least 24 hours.\n* **ends** (datetime): The end date and time of the promotion, if ommited the promotion runs indefinitely. Must be in UTC and in the format `YYYY-MM-DDTHH:MM:SSZ`, and must be after the start date.\n* **types** (List[PromoType]): The types of the promotion. Possible values are: `create`, `renew` and `transfer`. Note: `renew` and `transfer` are separate events.\n* **discount_type** (DiscountType): The discount type of the promotion. Possible values: `percentage`, `fixedDiscount` and `targetPrice`.\n* **target_price** (float): The target price of the sale. Will calculate a variable discount based on the price of goods.\n* **tiers** (List[str]): The tiers associated with the promotion. The special name `default` is used to indicate standard price tier.\n* **registrars**: The registrar IDs associated with the promotion. The registrar must be enabled for the TLD and active.\n* **discount** (float): The discount value of the promotion. It will be interpreted as a percentage if the discount type is `percentage`, otherwise as a fixed amount.\n* **is_sticky** (bool): indicates whether the renewal price will by `stick` to the domain\n* **sticky_survives_transfer** (bool): indicates whether the renewal price will `stick` to the domain after a transfer\n* **allow_multiuse** (bool): indicates whether the promotion can be used multiple times for the same roid\n* **periods** (List[int]): The periods associated with the promotion. The period is the number of units for the promotion to apply, for instance, to apply a promotion when a domain is registered for 2 and 3 years, the period would be `[2, 3]`, registrations for 1 year would not included in this promotion, omitting this value will match all periods.\n* **per_transaction** (bool): indicates whether the promotion is applied per transaction or per year\n* **all_registrars** (bool): indicates whether the promotion applies to all registrars\n* **all_premium_tiers** (bool): indicates whether the promotion applies to all premium tiers\n\n### Registrar Format:\nThe `registrars` field accepts:\n\n```json\n\"registrars\": [\n    {\n        \"name\": \"registry_a\",\n        \"starts\": \"2024-01-01T00:00:00\",\n        \"ends\": \"2024-12-31T23:59:59\",\n        \"enabled\": true\n    },\n    {\n        \"name\": \"registry_b\"\n    }\n]\n```\n\n- `name` (required): The registrar identifier\n- `starts` (optional): Custom start date for this registrar (defaults to promo start)\n- `ends` (optional): Custom end date for this registrar (defaults to promo end)\n- `enabled` (optional): Whether the registrar is enabled (defaults to true)\n\nReturns:\n- APIResponse: The API response containing the result of the create operation.","operationId":"create_promo_by_tld__tld__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/promo/by-tld/{tld}/{id}":{"patch":{"tags":["Promotions"],"summary":"Update","description":"Update a promotion.\n\nUses the same fields as the create endpoint, allowing all fields to be\nupdated if the promotion is scheduled for the future.\n\nPromotions that are running can be updated on following fields:\n\n* name\n* ends\n* types\n* registrars\n* discount\n* object groups\n\nIf the promotion has ended, no changes are allowed.\n\n### Registrar Format:\nThe `registrars` field accepts two formats:\n\n\n**New format (list of objects with details):**\n```json\n\"registrars\": [\n    {\n        \"name\": \"registry_a\",\n        \"starts\": \"2024-01-01T00:00:00\",\n        \"ends\": \"2024-12-31T23:59:59\",\n        \"enabled\": true\n    },\n    {\n        \"name\": \"registry_b\"\n    }\n]\n```\n\nIn the new format:\n- `name` (required): The registrar identifier\n- `starts` (optional): Custom start date for this registrar (defaults to promo start)\n- `ends` (optional): Custom end date for this registrar (defaults to promo end)\n- `enabled` (optional): Whether the registrar is enabled (defaults to true)","operationId":"update_promo_by_tld__tld___id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Promotions"],"summary":"Get Promo","description":"Retrieves information about a specific point of sale pricing promotion.\n\n### Parameters:\n- **tld** (str): The top-level domain for the promotion.\n- **id** (int): The promotion ID.\n\n### Registrar Output Format:\n\nThe detailed format includes:\n- `name`: The registrar identifier\n- `starts`: The start date for this registrar's participation\n- `ends`: The end date for this registrar's participation\n- `enabled`: Whether the registrar is currently enabled for this promotion\n\nReturns:\n- APIResponse: The API response containing the promotion details.","operationId":"get_promo_promo_by_tld__tld___id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Promotions"],"summary":"Delete Or End Promo","description":"Delete or end a promo based on the promotion status.\n\nIf the promotion is active, it will be ended, and if it is scheduled\nfor the future, it will be deleted.\n\nParameters:\n* **tld** (str): The top-level domain of the promo.\n* **id** (int): The ID of the promo.\n\nReturns:\n    APIResponse: The API response indicating the success or failure of the\n    operation.","operationId":"delete_or_end_promo_promo_by_tld__tld___id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/promo/list":{"post":{"tags":["Promotions"],"summary":"Promos","description":"List of all promotions\n\nIf the `date` parameter is skipped, NOW() will be used instead.","operationId":"promos_promo_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PromoField"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPromo"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/promo/transactions":{"post":{"tags":["Promotions"],"summary":"Promo Txns","description":"Get a list of transactions associated with a promotion","operationId":"promo_txns_promo_transactions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"promo_id","in":"query","required":true,"schema":{"type":"integer","title":"Promo Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PromoTransactionField"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPromoTransaction"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/promo/{tld}/simulate":{"post":{"tags":["Promotions"],"summary":"Simulate Promo","operationId":"simulate_promo_promo__tld__simulate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registrar/billing_types":{"get":{"tags":["Registrars"],"summary":"List Registrar Billing Types","description":"List all registrar billing types from the registrar_billing_type table.","operationId":"get_billing_types_registrar_billing_types_get","responses":{"200":{"description":"List of registrar billing types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/registrar/":{"get":{"tags":["Registrars"],"summary":"List Registrars","description":"List all registrars with balance and accreditation information.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves a paginated list of registrars including their contact information,\nfinancial balance, and TLD accreditation status. This endpoint is commonly used\nfor registrar management dashboards and financial reporting.\n\n## Query Parameters\n\n- **name_regex** (optional): Regular expression to filter by registrar name\n  - Case-insensitive pattern matching\n  - Example: `.*acme.*` matches any registrar with \"acme\" in the name\n- **iana_id** (optional): Filter by IANA registrar ID (exact match)\n- **page** (optional): Page number for pagination (default: 1)\n- **rows** (optional): Results per page (default: 100)\n\n## Response Fields\n\nEach registrar includes:\n- **name**: Registrar identifier (unique)\n- **iana_id**: IANA-assigned registrar identifier\n- **billing_id**: Internal billing system identifier\n- **descr**: Description or notes about the registrar\n- **company_name**: Legal company name\n- **address**: Street address\n- **city**: City name\n- **sp**: State or province\n- **pc**: Postal code\n- **cc**: ISO 3166-1 alpha-2 country code\n- **voice**: Voice telephone number\n- **fax**: Fax number\n- **email**: Contact email address\n- **whois_server**: WHOIS server hostname (port 43)\n- **referral_url**: Registrar's website URL\n- **enabled**: Whether the registrar can perform operations\n- **read_only**: Whether the registrar is restricted to read-only operations\n- **is_supervisor**: Can control server statuses on subordinate registrars\n- **balance_current**: Current account balance (in currency units)\n- **balance_enforce_minimum**: Whether minimum balance is enforced\n- **balance_notification_threshold**: Balance level that triggers notifications\n- **accredited_tlds**: Array of TLDs this registrar is accredited for\n- **billing_contact_emails**: Billing contact email(s) TRS invoices to, from\n  registrar_contact (type='billing'). Array; may hold more than one,\n  or null when none is set\n\n## Use Cases\n\n- **Registrar Management**: View all registrars and their operational status\n- **Financial Monitoring**: Check registrar account balances and thresholds\n- **Accreditation Review**: Verify which TLDs each registrar can manage\n- **Contact Information**: Retrieve registrar contact details for communication\n\n## Usage Examples\n\n```bash\n# List all registrars\ncurl -X GET \"https://api.example.com/registrar/\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Find registrars by name pattern\ncurl -X GET \"https://api.example.com/registrar/?name_regex=acme\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Find registrar by IANA ID\ncurl -X GET \"https://api.example.com/registrar/?iana_id=1234\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Paginated request\ncurl -X GET \"https://api.example.com/registrar/?page=2&rows=50\" \\\n  -H \"Authorization: Bearer <token>\"\n```","operationId":"registrars_registrar__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name_regex","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Regex"}},{"name":"iana_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iana Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successfully retrieved registrars","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"name":"acme-registrar","iana_id":"1234","billing_id":"ACME001","descr":"ACME Registrar Inc.","company_name":"ACME Corporation","address":"123 Main St","city":"San Francisco","sp":"CA","pc":"94105","cc":"US","voice":"+1.4155551234","fax":"+1.4155551235","email":"admin@acme-registrar.com","whois_server":"whois.acme-registrar.com","referral_url":"https://www.acme-registrar.com","enabled":true,"read_only":false,"is_supervisor":false,"balance_current":50000.0,"balance_enforce_minimum":true,"balance_notification_threshold":10000.0,"accredited_tlds":["com","net","org"],"billing_contact_emails":["billing@acme-registrar.com"]}],"pager":{"total_entries":1,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registrar/list":{"post":{"tags":["Registrars"],"summary":"List Registrars with Filtering","description":"List registrars with advanced filtering, sorting, and pagination.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves a paginated list of registrars with support for advanced filtering\nand sorting. This endpoint provides the same data as GET /registrar/ but\naccepts filters as a JSON body for complex queries.\n\n## Request Body\n\nPOST body accepts a JSON array of filter objects. Each filter object contains:\n- **field**: The field name to filter on (see Filterable Fields below)\n- **operator**: Comparison operator (=, !=, >, >=, <, <=, like, ilike, in, not in, is null, is not null, ~*, ~)\n- **value**: The value to compare against\n\n## Query Parameters\n\n- **page** (optional): Page number for pagination (default: 1)\n- **rows** (optional): Results per page (default: 100)\n- **sort_field** (optional): Field to sort by (default: name)\n- **sort_ascending** (optional): Sort direction (default: true)\n\n## Filterable Fields\n\n- **name**: Registrar identifier (unique)\n- **iana_id**: IANA-assigned registrar identifier\n- **billing_id**: Internal billing system identifier\n- **descr**: Description or notes about the registrar\n- **company_name**: Legal company name\n- **address**: Street address\n- **city**: City name\n- **sp**: State or province\n- **pc**: Postal code\n- **cc**: ISO 3166-1 alpha-2 country code\n- **voice**: Voice telephone number\n- **fax**: Fax number\n- **email**: Contact email address\n- **whois_server**: WHOIS server hostname\n- **referral_url**: Registrar's website URL\n- **enabled**: Whether the registrar can perform operations\n- **read_only**: Whether the registrar is restricted to read-only operations\n- **is_supervisor**: Can control server statuses on subordinate registrars\n- **balance_current**: Current account balance\n- **balance_minimum**: Minimum required balance\n- **balance_enforce_minimum**: Whether minimum balance is enforced\n- **balance_notification_threshold**: Balance level that triggers notifications\n- **billing_type**: Registrar billing classification (e.g. prepaid, postpaid)\n\n## Usage Examples\n\n```bash\n# List all registrars (no filters)\ncurl -X POST \"https://api.example.com/registrar/list\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[]'\n\n# Filter by enabled status\ncurl -X POST \"https://api.example.com/registrar/list\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[{\"field\": \"enabled\", \"operator\": \"=\", \"value\": true}]'\n\n# Filter by country code\ncurl -X POST \"https://api.example.com/registrar/list\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[{\"field\": \"cc\", \"operator\": \"=\", \"value\": \"US\"}]'\n\n# Regex search on registrar name\ncurl -X POST \"https://api.example.com/registrar/list\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[{\"field\": \"name\", \"operator\": \"~*\", \"value\": \".*acme.*\"}]'\n\n# Sort by balance descending\ncurl -X POST \"https://api.example.com/registrar/list?sort_field=balance_current&sort_ascending=false\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[]'\n\n# Multiple filters with pagination\ncurl -X POST \"https://api.example.com/registrar/list?page=1&rows=50\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\"field\": \"enabled\", \"operator\": \"=\", \"value\": true},\n    {\"field\": \"cc\", \"operator\": \"=\", \"value\": \"US\"}\n  ]'\n```","operationId":"registrars_list_registrar_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RegistrarList"},{"type":"null"}],"default":"name","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredRegistrarList"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successfully retrieved registrars","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"name":"acme-registrar","iana_id":"1234","billing_id":"ACME001","descr":"ACME Registrar Inc.","company_name":"ACME Corporation","address":"123 Main St","city":"San Francisco","sp":"CA","pc":"94105","cc":"US","voice":"+1.4155551234","fax":"+1.4155551235","email":"admin@acme-registrar.com","whois_server":"whois.acme-registrar.com","referral_url":"https://www.acme-registrar.com","enabled":true,"read_only":false,"is_supervisor":false,"balance_current":50000.0,"balance_minimum":2000.0,"balance_enforce_minimum":true,"balance_notification_threshold":10000.0,"accredited_tlds":["com","net","org"],"billing_contact_emails":["billing@acme-registrar.com"]}],"pager":{"total_entries":1,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registrar/balance_adjustments":{"post":{"tags":["Registrars"],"summary":"List Balance Adjustments","description":"List balance adjustments with filtering and sorting capabilities.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `ops:ro` (Operations Read-Only) or higher\n\n## Description\n\nRetrieves balance adjustments for registrars with detailed breakdown by TLD and\nadjustment type. Supports advanced filtering and sorting for financial reporting\nand reconciliation workflows.\n\n## Request Body\n\nPOST body accepts a JSON array of filter objects to narrow results. Each filter object contains:\n- **field**: The field name to filter on\n- **operator**: Comparison operator (eq, ne, lt, le, gt, ge, like, ilike, in, not_in)\n- **value**: The value to compare against\n\n## Response Fields\n\nEach adjustment includes:\n- **id**: Unique adjustment identifier\n- **created_date**: Timestamp when adjustment was created\n- **registrar_name**: Name of the registrar\n- **external_id**: External document reference (e.g., invoice number)\n- **note**: Description of the adjustment\n- **amount**: Total adjustment amount (negative for credits/debits)\n- **apply_date**: Date the adjustment affects the balance\n- **category**: Adjustment category (rebate, refund, credit, payment, etc.)\n- **category_descr**: Human-readable category description\n- **affects_revenue**: Whether adjustment impacts revenue reporting\n- **invoice_visible**: Whether shown on customer invoices\n- **detail**: Array of per-TLD adjustment details with:\n  - **tld_name**: TLD this detail applies to\n  - **adjustment_type**: Type of transaction (reg-revenue, renew-au-revenue, etc.)\n  - **amount**: Amount for this TLD\n  - **is_premium**: Whether premium domains\n  - **domain_count**: Number of domains affected\n- **registrar_company_name**: Legal company name of the registrar\n- **registrar_iana_id**: IANA-assigned registrar ID\n- **registrar_billing_id**: Internal billing system ID\n- **registrar_descr**: Description or notes about the registrar\n\n## Filtering Examples\n\n```bash\n# No filters - retrieve all adjustments\ncurl -X POST \"https://api.example.com/registrar/balance_adjustments\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[]'\n\n# Filter by registrar name\ncurl -X POST \"https://api.example.com/registrar/balance_adjustments\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"registrar_name\",\n      \"operator\": \"eq\",\n      \"value\": \"acme-registrar\"\n    }\n  ]'\n\n# Filter by amount less than or equal to 1000\ncurl -X POST \"https://api.example.com/registrar/balance_adjustments\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"amount\",\n      \"operator\": \"<=\",\n      \"value\": \"1000\"\n    }\n  ]'\n\n# Multiple filters: registrar name and amount\ncurl -X POST \"https://api.example.com/registrar/balance_adjustments\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"registrar_name\",\n      \"operator\": \"eq\",\n      \"value\": \"acme-registrar\"\n    },\n    {\n      \"field\": \"amount\",\n      \"operator\": \"<=\",\n      \"value\": \"1000\"\n    }\n  ]'\n\n# Filter by category\ncurl -X POST \"https://api.example.com/registrar/balance_adjustments\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"field\": \"category\",\n      \"operator\": \"eq\",\n      \"value\": \"rebate\"\n    }\n  ]'\n```\n\n## Use Cases\n\n- **Financial Reconciliation**: Match adjustments with external accounting systems\n- **Rebate Tracking**: Monitor volume rebates and credits issued\n- **Revenue Analysis**: Analyze adjustments that affect revenue recognition\n- **Audit Trail**: Review adjustment history for compliance","operationId":"get_adjustments_registrar_balance_adjustments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BalanceAdjustmentFields"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredBalanceAdjustments"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successfully retrieved balance adjustments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":12345,"created_date":"2024-01-15T10:30:00","registrar_name":"acme-registrar","external_id":"INV-2024-001","note":"Q4 2023 volume rebate","amount":-1500.0,"apply_date":"2024-01-01","category":"rebate","category_descr":"Return of a portion of the purchase price","affects_revenue":true,"invoice_visible":true,"detail":[{"tld_name":"com","adjustment_type":"reg-revenue","amount":-1000.0,"is_premium":false,"domain_count":500},{"tld_name":"net","adjustment_type":"reg-revenue","amount":-500.0,"is_premium":false,"domain_count":250}],"registrar_company_name":"ACME Corporation","registrar_iana_id":"1234","registrar_billing_id":"ACME001","registrar_descr":"ACME Registrar Inc."}],"pager":{"total_entries":150,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires ops:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registrar/{registrar_name}/balance":{"post":{"tags":["Registrars"],"summary":"Create Balance Adjustment","description":"Create a balance adjustment for a registrar.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `finances:rw` (Financial Read-Write)\n\n## Description\n\nCreates a new balance adjustment for a registrar, which can be a credit, debit,\nrebate, refund, payment, or other financial transaction. All adjustments are\naudited and affect the registrar's account balance.\n\n## Path Parameters\n\n- **registrar_name**: The registrar identifier to adjust the balance for\n\n## Request Body\n\nJSON object with the following structure:\n\n```json\n{\n    \"amount\": 1500.00,\n    \"apply_date\": \"2024-02-15T00:00:00Z\",\n    \"category_id\": \"rebate\",\n    \"note\": \"Q1 2024 volume rebate\",\n    \"document_id\": \"INV-2024-001\",\n    \"detail\": [\n        {\n            \"tld\": \"com\",\n            \"adjustment_type\": \"reg-revenue\",\n            \"amount\": 1000.00,\n            \"domain_count\": 500,\n            \"is_premium\": false\n        },\n        {\n            \"tld\": \"net\",\n            \"adjustment_type\": \"reg-revenue\",\n            \"amount\": 500.00,\n            \"domain_count\": 250,\n            \"is_premium\": false\n        }\n    ]\n}\n```\n\n## Request Fields\n\n- **amount** (required): Total adjustment amount (float)\n  - Positive values increase balance\n  - Negative values decrease balance\n- **category_id** (required): Adjustment category, one of:\n  - **rebate**: Return of a portion of the purchase price\n  - **refund**: Pay money back\n  - **credit**: Credit applied to customer balance\n  - **payment**: Payment (or pre-payment)\n  - **adjustment**: Balance adjustment without affecting revenue\n  - **rollover_credit**: Rollover Credit\n  - **balance_transfer**: Balance Transfer\n  - **igst**: Indian Goods and Services Tax (may not be available)\n  - **cgst**: Indian Central Goods and Services Tax (may not be available)\n  - **sgst/utgst**: Indian State Goods and Services Tax (may not be available)\n- **document_id** (required): External document reference\n  - Invoice number, receipt ID, or other tracking identifier\n- **apply_date** (optional): Date when adjustment affects balance\n  - ISO 8601 datetime format\n  - Allows backdating for accounting periods\n  - Defaults to current date if omitted\n- **note** (optional): Human-readable description of the adjustment\n- **detail** (required for rebate/refund/credit): Array of per-TLD breakdowns\n  - Required fields per detail item:\n    - **tld**: TLD name this detail applies to\n    - **adjustment_type**: Transaction type:\n      - **sunrise-revenue**: Sunrise phase registrations\n      - **volume-d-revenue**: General rebate/volume discount\n      - **reg-revenue**: Standard registrations\n      - **xfer-gain-revenue**: Incoming transfers\n      - **excess-d-revenue**: Excess deletions\n      - **renew-ex-revenue**: Explicit renewals\n      - **restore-revenue**: Domain restores\n      - **renew-au-revenue**: Automatic renewals\n    - **amount**: Amount for this TLD (must sum to total amount)\n  - Optional fields per detail item:\n    - **is_premium**: Whether premium domains (boolean)\n    - **domain_count**: Number of domains affected (integer)\n\n## Validation Rules\n\n- Detail amounts must sum exactly to the total adjustment amount\n- Registrar must exist in the system\n- Category ID must be valid\n- Document ID should be unique to prevent duplicate adjustments\n\n## Usage Examples\n\n```bash\n# Create a rebate adjustment\ncurl -X POST \"https://api.example.com/registrar/acme-registrar/balance\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": -1500.00,\n    \"category_id\": \"rebate\",\n    \"note\": \"Q4 2023 volume rebate\",\n    \"document_id\": \"REBATE-2024-001\",\n    \"detail\": [\n      {\n        \"tld\": \"com\",\n        \"adjustment_type\": \"reg-revenue\",\n        \"amount\": -1000.00,\n        \"domain_count\": 500,\n        \"is_premium\": false\n      },\n      {\n        \"tld\": \"net\",\n        \"adjustment_type\": \"reg-revenue\",\n        \"amount\": -500.00,\n        \"domain_count\": 250,\n        \"is_premium\": false\n      }\n    ]\n  }'\n\n# Create a payment adjustment\ncurl -X POST \"https://api.example.com/registrar/acme-registrar/balance\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": 10000.00,\n    \"category_id\": \"payment\",\n    \"note\": \"Wire transfer payment\",\n    \"document_id\": \"PAYMENT-2024-050\"\n  }'\n\n# Create a backdated adjustment\ncurl -X POST \"https://api.example.com/registrar/acme-registrar/balance\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": -200.00,\n    \"apply_date\": \"2024-01-31T23:59:59Z\",\n    \"category_id\": \"refund\",\n    \"note\": \"January refund for service outage\",\n    \"document_id\": \"REFUND-2024-005\",\n    \"detail\": [\n      {\n        \"tld\": \"com\",\n        \"adjustment_type\": \"reg-revenue\",\n        \"amount\": -200.00,\n        \"domain_count\": 10,\n        \"is_premium\": false\n      }\n    ]\n  }'\n```\n\n## Use Cases\n\n- **Volume Rebates**: Apply periodic rebates based on registration volume\n- **Payment Processing**: Record customer payments and pre-payments\n- **Refunds**: Process refunds for service issues or cancellations\n- **Credits**: Apply promotional credits or adjustments\n- **Tax Accounting**: Record tax-related adjustments\n\n## Response\n\nReturns the newly created adjustment ID on success.","operationId":"add_balance_registrar__registrar_name__balance_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"registrar_name","in":"path","required":true,"schema":{"type":"string","title":"Registrar Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceAdjustment"}}}},"responses":{"200":{"description":"Balance adjustment creation confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"201":{"description":"Balance adjustment created successfully","content":{"application/json":{"example":{"status":201,"ok":true,"msg":"Request completed successfully","data":[{"id":12346}]}}}},"400":{"description":"Validation error (e.g., detail amounts don't sum to total)"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires finances:rw role) or duplicate adjustment"},"500":{"description":"Internal server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/list":{"post":{"tags":["Domain Restrictions"],"summary":"Restrictions","description":"List existing restriction sets.\n\nReturns a paginated list of restriction sets with entry counts for each type.\n\n**Permission Required:** \n- `restriction:view` - for full list\n- `restriction:view_scoped` - for a scoped set of restrictions\n\nQuery Parameters:\n    id: Filter by specific restriction ID\n    name: Filter by exact restriction name\n    active: Filter by active status (true/false)\n    can_register: Filter by registration allowance\n    prevents_publication: Filter by DNS publication prevention\n\nPagination Parameters:\n    page: Page number (default: 1)\n    rows: Results per page (default: 100)\n    csv: Set to true to export as CSV\n\nRequest Body (filters):\n    Array of filter objects with fields: `id`, `name`, `reason`, `can_register`,\n    `active`, `priority`, `prevents_publication`, `total_domain_entries`,\n    `total_word_entries`, `total_regexp_entries`, `since_date`, `to_date`\n\nResponse Fields:\n    - id: Unique restriction identifier\n    - name: Restriction set name\n    - reason: Reason displayed in WHOIS\n    - can_register: Whether domains can be registered with authorization\n    - active: Whether restriction is currently enforced\n    - priority: Processing priority (lower = higher priority) (missing in scoped view)\n    - prevents_publication: Whether matching domains are hidden from DNS (missing in scoped view)\n    - total_domain_entries: Count of domain entries in this set\n    - total_word_entries: Count of word entries in this set\n    - total_regexp_entries: Count of regexp entries in this set\n    - since_date: Start of validity period\n    - to_date: End of validity period\n    - is_system: Whether this is a system-managed restriction (missing in scoped view)\n\nReturns:\n    APIResponsePaginated with restriction sets and pager metadata","operationId":"restrictions_restriction_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"can_register","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Register"}},{"name":"prevents_publication","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prevents Publication"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RestrictionFields"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredRestriction"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}":{"get":{"tags":["Domain Restrictions"],"summary":"Get Restriction","description":"Get a single restriction set by ID.\n\nReturns detailed information about a specific restriction set including\nentry counts for domains, words, and regexp patterns.\n\n**Permission Required:** `ops:ro`\n\nPath Parameters:\n    id: The restriction set ID to retrieve\n\nResponse Fields:\n    - id: Unique restriction identifier\n    - name: Restriction set name\n    - reason: Reason displayed in WHOIS\n    - can_register: Whether domains can be registered with authorization\n    - active: Whether restriction is currently enforced\n    - priority: Processing priority (lower = higher priority) (missing in scoped view)\n    - prevents_publication: Whether matching domains are hidden from DNS (missing in scoped view)\n    - pre_verification: Whether matching domains require manual approval (missing in scoped view)\n    - total_domain_entries: Count of domain entries in this set\n    - total_word_entries: Count of word entries in this set\n    - total_regexp_entries: Count of regexp entries in this set\n    - since_date: Start of validity period\n    - to_date: End of validity period\n    - is_system: Whether this is a system-managed restriction (missing in scoped view)\n\nReturns:\n    APIResponse with the restriction details\n\nRaises:\n    404 Not Found: If the restriction ID does not exist","operationId":"get_restriction_restriction__id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Domain Restrictions"],"summary":"Update Restriction","description":"Update an existing restriction set.\n\nUpdates the specified fields of a restriction set. Only provided fields\nare updated; omitted fields retain their current values.\n\n**Permission Required:** `ops:rw`\n\nPath Parameters:\n    id: The restriction set ID to update\n\nQuery Parameters:\n    name: New name for the restriction set\n    reason: New reason displayed in WHOIS\n    active: Whether restriction is enforced\n    can_register: Whether domains can be registered with authorization\n    prevents_publication: Whether matching domains are hidden from DNS\n    update_validity: Set to true to update the validity period\n        (required when changing since_date or to_date)\n    since_date: New start of validity period\n    to_date: New end of validity period\n\nReturns:\n    APIResponse confirming the update\n\nRaises:\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nNote:\n    To update validity dates, you must set `update_validity=true`.\n    This is a safety measure to prevent accidental validity changes.","operationId":"update_restriction_restriction__id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"can_register","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Register"}},{"name":"prevents_publication","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prevents Publication"}},{"name":"pre_verification","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pre Verification"}},{"name":"update_validity","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Update Validity"}},{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Domain Restrictions"],"summary":"Delete Restriction","description":"Delete a restriction set and all its entries.\n\nPermanently removes a restriction set along with all associated domain,\nword, and regexp entries. This action cannot be undone.\n\n**Permission Required:** `ops:rw`\n\nPath Parameters:\n    id: The restriction set ID to delete\n\nReturns:\n    APIResponse confirming the deletion\n\nRaises:\n    403 Forbidden: If attempting to delete a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nWarning:\n    This operation cascades to delete all entries (domains, words, regexps)\n    associated with this restriction set.","operationId":"delete_restriction_restriction__id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/":{"post":{"tags":["Domain Restrictions"],"summary":"Create Restriction","description":"Create a new restriction set.\n\nCreates an empty restriction set that can later be populated with domain,\nword, or regexp entries.\n\n**Permission Required:** `ops:rw`\n\nQuery Parameters:\n    name: Unique name for the restriction set (required)\n    reason: Reason displayed in WHOIS (default: \"Registry Reserved\")\n    active: Whether restriction is enforced (default: true)\n    can_register: Whether domains can be registered with authorization\n        code/password (default: true)\n    prevents_publication: Whether matching domains are hidden from DNS\n        (default: false)\n    since_date: Start of validity period (default: -Infinity)\n    to_date: End of validity period (default: Infinity)\n    pre_verification: Whether matching domains require manual approval\n        before registration (default: false)\n\nReturns:\n    APIResponse with the created restriction's ID in the data array\n\nRaises:\n    409 Conflict: If a restriction with the same name already exists\n\nExample:\n    POST /restriction/?name=premium-names&reason=Premium%20Domain","operationId":"create_restriction_restriction__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","title":"Name"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","default":"Registry Reserved","title":"Reason"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Active"}},{"name":"can_register","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Can Register"}},{"name":"since_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"prevents_publication","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Prevents Publication"}},{"name":"pre_verification","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Pre Verification"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/entries":{"post":{"tags":["Domain Restrictions"],"summary":"Restriction Entries","description":"List all entries for a specific restriction set.\n\nReturns a unified view of all domain, word, and regexp entries belonging\nto a single restriction set, with registration status information.\n\n**Permission Required:** \n- `restriction:view` - view entries of any restriction set\n- `restriction:view_scoped` - view entries of a scoped set of restriction sets\n\nPath Parameters:\n    id: The restriction set ID to query\n\nPagination Parameters:\n    page: Page number (default: 1)\n    rows: Results per page (default: 100)\n    csv: Set to true to export as CSV\n\nRequest Body (filters):\n    Array of filter objects with fields: `restriction_id`, `restriction_name`,\n    `id`, `type`, `value`, `tld_name`, `password`, `is_registered`,\n    `expiry_date`, `registration_date`, `registrant_email`\n\nResponse Fields (full):\n    - restriction_id: Parent restriction set ID\n    - restriction_name: Parent restriction set name\n    - id: Entry ID (only for regexp entries)\n    - type: Entry type (\"domain\", \"word\", or \"regexp\")\n    - value: The restricted value (domain name, word, or pattern)\n    - uname: Unicode domain name (for IDN domains)\n    - tld_name: TLD portion (for domain entries)\n    - password: Authorization code for registration\n    - is_registered: Whether a matching domain is currently registered (domain entries only; always null for word/regexp entries)\n    - expiry_date: Expiry date of registered domain, if applicable (domain entries only; always null for word/regexp entries)\n    - registration_date: Registration date, if applicable (domain entries only; always null for word/regexp entries)\n    - registrant_email: Registrant contact email, if applicable (domain entries only; always null for word/regexp entries)\n    - added_date: When the entry was added to the restriction\n\nRaises:\n    404 Not Found: If the restriction ID does not exist","operationId":"restriction_entries_restriction__id__entries_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RestrictionEntriesFields"},{"type":"null"}],"default":"value","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredRestrictionEntries"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/entries":{"post":{"tags":["Domain Restrictions"],"summary":"Restriction Entries All","description":"List entries across all restriction sets.\n\nReturns a unified view of all domain, word, and regexp entries from all\nrestriction sets, with registration status information. Useful for searching\nacross all restrictions or exporting complete restriction data.\n\n**Permission Required:** `ops:ro`\n\nPagination Parameters:\n    page: Page number (default: 1)\n    rows: Results per page (default: 100)\n    csv: Set to true to export as CSV\n\nRequest Body (filters):\n    Array of filter objects with fields: `restriction_id`, `restriction_name`,\n    `id`, `type`, `value`, `tld_name`, `password`, `is_registered`,\n    `expiry_date`, `registration_date`, `registrant_email`\n\nResponse Fields:\n    - restriction_id: Parent restriction set ID\n    - restriction_name: Parent restriction set name\n    - is_system: Whether the parent restriction is system-managed\n    - id: Entry ID (only for regexp entries)\n    - type: Entry type (\"domain\", \"word\", or \"regexp\")\n    - value: The restricted value (domain name, word, or pattern)\n    - uname: Unicode domain name (for IDN domains)\n    - tld_name: TLD portion (for domain entries)\n    - password: Authorization code for registration\n    - is_registered: Whether a matching domain is currently registered (domain entries only; always null for word/regexp entries)\n    - expiry_date: Expiry date of registered domain, if applicable (domain entries only; always null for word/regexp entries)\n    - registration_date: Registration date, if applicable (domain entries only; always null for word/regexp entries)\n    - registrant_email: Registrant contact email, if applicable (domain entries only; always null for word/regexp entries)\n    - added_date: When the entry was added to the restriction\n\nExample - Filter by type:\n    POST /restriction/entries\n    Body: [{\"field\": \"type\", \"value\": \"domain\", \"operator\": \"=\"}]\n\nExample - Filter by restriction name:\n    POST /restriction/entries\n    Body: [{\"field\": \"restriction_name\", \"value\": \"premium\", \"operator\": \"ilike\"}]","operationId":"restriction_entries_all_restriction_entries_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RestrictionEntriesFields"},{"type":"null"}],"default":"value","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredRestrictionEntries"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/domain":{"post":{"tags":["Domain Restrictions"],"summary":"Add Restricted Domain","description":"Add domain names to a restriction set.\n\nAdds one or more fully-qualified domain names to the restriction set.\nDomain entries match exact domain names including the TLD.\n\n**Permission Required:**\n- `restriction_entry:manage` - manage entries of any restriction set\n- `restriction_entry:manage_scoped` - manage entries of a scoped set of restrictions\n\nPath Parameters:\n    id: The restriction set ID\n\nRequest Body:\n    names: List of fully-qualified domain names (e.g., [\"example.tech\", \"test.store\"])\n\nBehavior:\n    - Domain names are normalized to lowercase\n    - IDN (internationalized) domains are supported and stored separately\n    - TLDs are validated against the registry's TLD list\n    - Duplicate entries are silently ignored (ON CONFLICT DO NOTHING)\n\nReturns:\n    APIResponse confirming domains were added\n\nRaises:\n    400 Bad Request: If any domain name is invalid or has an invalid TLD\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nExample:\n    POST /restriction/123/domain\n    Body: {\"names\": [\"premium.tech\", \"vip.store\"]}","operationId":"add_restricted_domain_restriction__id__domain_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedDomainList"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Domain Restrictions"],"summary":"Update Domain","description":"Add and/or remove domain names from a restriction set.\n\nAllows atomic batch updates to domain entries. Both add and remove\noperations are performed in a single transaction.\n\n**Permission Required:** \n- `restriction_entry:manage` - manage entries of any restriction set\n- `restriction_entry:manage_scoped` - manage entries of a scoped set of restrictions\n\nPath Parameters:\n    id: The restriction set ID\n\nRequest Body:\n    add: Object with \"names\" list to add (optional)\n    remove: Object with \"names\" list to remove (optional)\n\nReturns:\n    APIResponse confirming domains were updated\n\nRaises:\n    400 Bad Request: If any domain name is invalid\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nExample:\n    PATCH /restriction/123/domain\n    Body: {\n        \"add\": {\"names\": [\"new-premium.tech\"]},\n        \"remove\": {\"names\": [\"old-premium.tech\"]}\n    }","operationId":"update_domain_restriction__id__domain_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedDomainListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/word":{"post":{"tags":["Domain Restrictions"],"summary":"Add Restricted Word","description":"Add words (domain labels) to a restriction set.\n\nAdds one or more words that will be restricted across all TLDs.\nWord entries match the label portion of domain names (before the dot).\n\n**Permission Required:** `ops:rw`\n\nPath Parameters:\n    id: The restriction set ID\n\nRequest Body:\n    words: List of domain labels without TLD (e.g., [\"premium\", \"vip\", \"gold\"])\n\nBehavior:\n    - Words are normalized to lowercase\n    - Words must not contain periods (they are labels, not FQDNs)\n    - IDN labels are IDNA-encoded before storage\n    - Duplicate entries are silently ignored\n    - Each word blocks that label across ALL TLDs (e.g., \"premium\" blocks\n      premium.tech, premium.store, premium.link, etc.)\n\nReturns:\n    APIResponse confirming words were added\n\nRaises:\n    400 Bad Request: If any word contains periods or is invalid\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nExample:\n    POST /restriction/123/word\n    Body: {\"words\": [\"premium\", \"vip\", \"exclusive\"]}","operationId":"add_restricted_word_restriction__id__word_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedWordList"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Domain Restrictions"],"summary":"Update Word","description":"Add and/or remove words from a restriction set.\n\nAllows atomic batch updates to word entries. Both add and remove\noperations are performed in a single transaction.\n\n**Permission Required:** `ops:rw`\n\nPath Parameters:\n    id: The restriction set ID\n\nRequest Body:\n    add: Object with \"words\" list to add (optional)\n    remove: Object with \"words\" list to remove (optional)\n\nReturns:\n    APIResponse confirming words were updated\n\nRaises:\n    400 Bad Request: If any word is invalid\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nExample:\n    PATCH /restriction/123/word\n    Body: {\n        \"add\": {\"words\": [\"newword\"]},\n        \"remove\": {\"words\": [\"oldword\"]}\n    }","operationId":"update_word_restriction__id__word_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedWordUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/regexp":{"post":{"tags":["Domain Restrictions"],"summary":"Add Restricted Regexp","description":"Add a regular expression pattern to a restriction set.\n\nAdds a PostgreSQL-compatible regular expression that matches domain names.\nRegexp entries provide flexible pattern matching for complex restrictions.\n\n**Permission Required:** `domain-restrictions_regex:rw`\n\nPath Parameters:\n    id: The restriction set ID\n\nRequest Body:\n    regexp: PostgreSQL regular expression pattern\n\nBehavior:\n    - Pattern is validated against PostgreSQL's regex engine before storage\n    - Pattern is matched against full domain names (e.g., \"example.tech\")\n    - Use ^ and $ anchors for exact matching if needed\n    - Pattern matching uses PostgreSQL's ~ operator (case-sensitive)\n\nReturns:\n    APIResponse with the created regexp entry (including its ID)\n\nRaises:\n    400 Bad Request: If the regular expression is invalid\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction ID does not exist\n\nExample - Block all domains starting with \"test\":\n    POST /restriction/123/regexp\n    Body: {\"regexp\": \"^test.*\"}\n\nExample - Block domains containing numbers:\n    POST /restriction/123/regexp\n    Body: {\"regexp\": \".*[0-9]+.*\"}","operationId":"add_restricted_regexp_restriction__id__regexp_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedRegexpAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/regexp/{regexp_id}":{"patch":{"tags":["Domain Restrictions"],"summary":"Update Restricted Regexp","description":"Update an existing regular expression pattern.\n\nReplaces the pattern of an existing regexp entry with a new pattern.\n\n**Permission Required:** `domain-restrictions_regex:rw`\n\nPath Parameters:\n    id: The restriction set ID\n    regexp_id: The regexp entry ID to update\n\nRequest Body:\n    regexp: New PostgreSQL regular expression pattern\n\nReturns:\n    APIResponse with the updated regexp entry\n\nRaises:\n    400 Bad Request: If the new regular expression is invalid\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction or regexp ID does not exist","operationId":"update_restricted_regexp_restriction__id__regexp__regexp_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"regexp_id","in":"path","required":true,"schema":{"type":"integer","title":"Regexp Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestrictedRegexpAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Domain Restrictions"],"summary":"Delete Restricted Regexp","description":"Delete a regular expression from a restriction set.\n\nPermanently removes a regexp entry from the restriction set.\n\n**Permission Required:** `domain-restrictions_regex:rw`\n\nPath Parameters:\n    id: The restriction set ID\n    regexp_id: The regexp entry ID to delete\n\nReturns:\n    APIResponse confirming the deletion\n\nRaises:\n    403 Forbidden: If attempting to modify a system restriction\n    404 Not Found: If the restriction or regexp ID does not exist","operationId":"delete_restricted_regexp_restriction__id__regexp__regexp_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"regexp_id","in":"path","required":true,"schema":{"type":"integer","title":"Regexp Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/purged":{"post":{"tags":["Domain Restrictions"],"summary":"Purged Domains","description":"Find purged domains that match active restrictions.\n\nReturns domains that have been deleted/purged from the registry, match\nan active restriction, and are not currently registered. This helps\nidentify restricted domains that may have been inadvertently released.\n\n**Permission Required:** `ops:ro`\n\nQuery Parameters:\n    from_date: Start of date range (default: beginning of current month)\n    to_date: End of date range (default: now)\n\nPagination Parameters:\n    page: Page number (default: 1)\n    rows: Results per page (default: 100)\n    csv: Set to true to export as CSV\n\nRequest Body (filters):\n    Array of filter objects with fields: `name`, `purged_date`, `source`,\n    `restriction_name`, `restriction_id`\n\nResponse Fields:\n    - name: The purged domain name\n    - purged_date: When the domain was purged\n    - source: Type of restriction match (\"restricted_domain\", \"restricted_word\",\n      or \"restricted_regexp\")\n    - restriction_name: Name of the matching restriction set\n    - restriction_id: ID of the matching restriction set\n\nUse Cases:\n    - Audit restricted domains that were purged and are now available\n    - Identify domains that should be re-added to restrictions\n    - Monitor for policy compliance","operationId":"purged_domains_restriction_purged_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PurgedNamesFields"},{"type":"null"}],"default":"name","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredPurgedNames"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/check/{name}":{"get":{"tags":["Domain Restrictions"],"summary":"Check Name","description":"Check if a domain name matches any active restrictions.\n\nQueries all active restrictions to determine which ones apply to the\ngiven domain name. Checks domain entries, word entries, and regexp\npatterns.\n\n**Permission Required:** `ops:ro`\n\nPath Parameters:\n    name: The fully-qualified domain name to check (e.g., \"example.tech\")\n\nResponse Fields:\n    - name: The checked domain name\n    - source: Type of restriction match (\"restricted_domain\", \"restricted_word\",\n      or \"restricted_regexp\")\n    - restriction_name: Name of the matching restriction set\n    - restriction_id: ID of the matching restriction set\n\nReturns:\n    APIResponse with list of matching restrictions (empty if none match)\n\nNote:\n    Only checks restrictions that are currently active (active=true) and\n    within their validity period.\n\nExample:\n    GET /restriction/check/premium.tech","operationId":"check_name_restriction_check__name__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/restriction/{id}/verify":{"post":{"tags":["Domain Restrictions"],"summary":"Verify Restriction List","description":"Verify a list of domain names against restriction rules.\n\nPerforms comprehensive validation of domain names, checking availability,\nrestrictions, IDN rules, and whether they already exist in the specified\nrestriction set. Useful for bulk validation before adding to restrictions.\n\n**Permission Required:** `ops:ro`\n\nPath Parameters:\n    id: The restriction set ID to check against for duplicates\n\nRequest Body:\n    names: List of fully-qualified domain names to verify\n\nResponse Fields (per domain):\n    - id: Row number in the input list\n    - name: The domain name checked\n    - valid: Whether the domain name syntax is valid\n    - valid_tld: Whether the TLD is valid in this registry\n    - fail_idn_check: Whether IDN validation failed\n    - tldre_restricted: Whether blocked by TLD-level restrictions\n    - idn_variant: Whether this is an IDN variant of another domain\n    - registered: Whether currently registered\n    - restricted_domain: Whether blocked by a domain restriction\n    - restricted_word: Whether blocked by a word restriction\n    - restricted_regexp: Whether blocked by a regexp restriction\n    - uniep_blocked: Whether blocked by Uniregistry policy\n    - on_extended_sunrise: Whether in extended sunrise period\n    - pending: Whether pending registration approval\n    - available: Whether available for registration\n    - duplicates: Whether duplicated in the input list\n    - is_new_domain: Whether not already in the target restriction set\n    - invalid_tld: Whether TLD is not in registry\n\nUse Cases:\n    - Validate a bulk list before adding to restrictions\n    - Check for duplicates and already-restricted domains\n    - Audit domain availability and restriction status\n\nExample:\n    POST /restriction/123/verify\n    Body: [\"premium.tech\", \"test.store\", \"invalid\"]","operationId":"verify_restriction_list_restriction__id__verify_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Names"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/streams/client":{"get":{"tags":["Event Streams"],"summary":"Get","description":"This Websockets client is used to receive events from the SRS event stream.\n\nAuthentication:\n- token: The authentication token for the user.\n\nOffset:\n- next: Start consuming events from the next event.\n- first: Start consuming events from the beginning of the stream.\n- <msgid> (int): Start consuming events from the event with the given msgid.\n- Time offset: Start consuming events from the given time offset, i.e.: `1D`\n  valid units: Y, M, D, h, m, s\n\nFilter:\n- The event type to filter on. If not provided, all events are returned.\n- Valid event types are:\n    - domain_registration\n    - domain_transfer\n    - domain_renewal\n    - domain_reserved\n    - domain_unreserved\n    - domain_reserved_word\n    - domain_unreserved_word\n    - domain_reserved_regex\n    - domain_unreserved_regex","operationId":"get_streams_client_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tld/list":{"get":{"tags":["Top Level Domains"],"summary":"List Top-Level Domains","description":"List all Top-Level Domains (TLDs) configured in the registry system.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: Any authenticated user\n\n## Description\n\nRetrieves a list of all TLDs (domain extensions) that are configured in the\nregistry system, including their Unicode names and active status. This is\nuseful for understanding which TLDs are operational and available for domain\nregistrations.\n\n## Query Parameters\n\n- **page** (optional): Page number (default: 1)\n- **rows** (optional): Results per page (default: 100)\n\n## Response Fields\n\nEach TLD includes:\n- **name**: TLD identifier (ASCII/punycode format)\n  - For ASCII TLDs: same as standard TLD (e.g., \"com\")\n  - For IDN TLDs: punycode format (e.g., \"xn--...\")\n- **uname**: Unicode name of the TLD\n  - For ASCII TLDs: same as name (e.g., \"com\")\n  - For IDN TLDs: native Unicode characters (e.g., \"公司\")\n- **is_active**: Whether TLD is currently active\n  - **true**: TLD is operational and accepting registrations\n  - **false**: TLD is inactive (sunset, not yet launched, etc.)\n\n## TLD Lifecycle States\n\n- **Active (is_active=true)**: TLD is operational\n- **Inactive (is_active=false)**: TLD is not accepting registrations\n  - Pre-launch: TLD configured but not yet operational\n  - Sunset: TLD being phased out\n  - Maintenance: Temporarily inactive\n\n## Usage Examples\n\n```bash\n# List all TLDs\ncurl -X GET \"https://api.example.com/tlds/list\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Paginated request\ncurl -X GET \"https://api.example.com/tlds/list?page=1&rows=50\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **System Discovery**: Understand which TLDs are configured\n- **Integration Setup**: Configure client systems with available TLDs\n- **Monitoring**: Track TLD activation status\n- **UI Population**: Populate dropdown lists with available TLDs\n- **Reporting**: Generate TLD inventory reports\n\n## Notes\n\n- TLDs are ordered alphabetically by uname\n- List includes both ASCII and IDN (Internationalized Domain Name) TLDs\n- Active status is determined by the TLD's valid_range timestamp\n- Inactive TLDs remain in the system for historical data","operationId":"tld_list_tld_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successfully retrieved TLD list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"name":"com","uname":"com","is_active":true},{"name":"net","uname":"net","is_active":true},{"name":"org","uname":"org","is_active":false}],"pager":{"total_entries":15,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/deleted":{"get":{"tags":["Trust and Safety - Domains"],"summary":"Deleted","description":"Trust and Safety: List deleted domains\n\nEnumerate domain deletions matching abuse incident information\nknown to SRS.","operationId":"deleted_tns_deleted_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/registry_locked":{"get":{"tags":["Trust and Safety - Domains"],"summary":"Registry Locked","description":"Trust and Safety: List registry locked domains","operationId":"registry_locked_tns_registry_locked_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/incidents":{"get":{"tags":["Trust and Safety - Domains"],"summary":"List Abuse Incidents","description":"List abuse incidents tracked by the Trust & Safety system.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `abuse:ro` (Abuse Read-Only) or higher\n\n## Description\n\nRetrieves abuse incidents including phishing, malware, spam, and other\nmalicious activity associated with registered domains. Used for abuse\nmonitoring, compliance reporting, and takedown coordination.\n\n## Query Parameters\n\n- **from_date** (optional): Start date for incident creation (ISO 8601)\n- **to_date** (optional): End date for incident creation (ISO 8601)\n- **domain_name** (optional): Filter by specific domain name\n- **tld_name** (optional): Filter by TLD\n- **registrar_name** (optional): Filter by registrar\n- **type** (optional): Filter by incident type (phishing, malware, spam, etc.)\n- **page** (optional): Page number (default: 1)\n- **rows** (optional): Results per page (default: 100)\n\n## Response Fields\n\nEach incident includes:\n- **id**: Unique incident identifier\n- **created_date**: When incident was recorded in system\n- **first_seen_date**: When abuse was first observed\n- **last_seen_date**: Most recent observation of abuse\n- **resolved_date**: When incident was resolved (null if ongoing)\n- **resolved_note**: Resolution details and actions taken\n- **domain_name**: Domain associated with incident\n- **tld_name**: TLD of the domain\n- **registrar_name**: Sponsoring registrar\n- **incident_type**: Type of abuse (phishing, malware, spam, copyright, etc.)\n\n## Incident Lifecycle\n\n1. **Created**: Initial report received, first_seen_date recorded\n2. **Monitoring**: Updates recorded via last_seen_date\n3. **Resolved**: Actions taken, resolved_date and resolved_note set\n\n## Usage Examples\n\n```bash\n# List all incidents\ncurl -X GET \"https://api.example.com/tns/incidents\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Filter by date range\ncurl -X GET \"https://api.example.com/tns/incidents?from_date=2024-01-01&to_date=2024-01-31\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Filter by domain\ncurl -X GET \"https://api.example.com/tns/incidents?domain_name=suspicious-site.com\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Filter by incident type\ncurl -X GET \"https://api.example.com/tns/incidents?type=phishing\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Filter by registrar and TLD\ncurl -X GET \"https://api.example.com/tns/incidents?registrar_name=acme-registrar&tld_name=com\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Abuse Monitoring**: Track ongoing abuse incidents\n- **Compliance Reporting**: Generate abuse statistics for ICANN compliance\n- **Registrar Coordination**: Identify incidents requiring registrar action\n- **Trend Analysis**: Analyze abuse patterns across TLDs and registrars\n- **Takedown Tracking**: Monitor resolution of abuse complaints","operationId":"get_incidents_tns_incidents_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successfully retrieved abuse incidents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":12345,"created_date":"2024-01-15T10:30:00","first_seen_date":"2024-01-10T08:00:00","last_seen_date":"2024-01-12T15:30:00","resolved_date":"2024-01-15T12:00:00","resolved_note":"Domain suspended, registrar notified","domain_name":"suspicious-site.com","tld_name":"com","registrar_name":"acme-registrar","incident_type":"phishing"}],"pager":{"total_entries":250,"entries_per_page":100,"current_page":1}}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires abuse:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trust and Safety - Domains"],"summary":"Delete Incidents","description":"Trust and Safety: Remove abuse-related incidents","operationId":"delete_incidents_tns_incidents_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Trust and Safety - Domains"],"summary":"Create Abuse Incident","description":"Create a new abuse incident record.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `abuse:rw` (Abuse Read-Write)\n\n## Description\n\nRecords a new abuse incident in the Trust & Safety system. Used to track\nphishing, malware, spam, copyright violations, and other malicious activity\nassociated with domain names.\n\n## Query Parameters\n\n- **domain_name** (required): Domain name associated with the incident\n- **tld_name** (required): TLD of the domain\n- **registrar_name** (required): Sponsoring registrar\n- **type** (required): Incident type (see GET /tns/incidents/types for valid types)\n  - Common types: phishing, malware, spam, copyright, trademark, illegal-content\n- **resolved_date** (required): Date incident was resolved (ISO 8601)\n- **resolved_note** (required): Resolution details and actions taken\n- **first_seen_date** (optional): When abuse was first observed (defaults to now)\n- **last_seen_date** (optional): Most recent observation (defaults to now)\n\n## Workflow\n\n1. **Detection**: Abuse reported via external feed or complaint\n2. **Recording**: Create incident with first_seen_date\n3. **Action**: Take appropriate remediation steps\n4. **Resolution**: Record resolution with resolved_date and resolved_note\n\n## Usage Examples\n\n```bash\n# Report phishing incident\ncurl -X POST \"https://api.example.com/tns/incidents?domain_name=phishing-site.com&tld_name=com&registrar_name=acme-registrar&type=phishing&resolved_date=2024-01-15T12:00:00Z&resolved_note=Domain+suspended+per+abuse+policy\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Report malware with custom dates\ncurl -X POST \"https://api.example.com/tns/incidents?domain_name=malware-site.net&tld_name=net&registrar_name=acme-registrar&type=malware&first_seen_date=2024-01-10T08:00:00Z&last_seen_date=2024-01-12T15:00:00Z&resolved_date=2024-01-15T10:00:00Z&resolved_note=Registrar+notified+and+domain+locked\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Report copyright violation\ncurl -X POST \"https://api.example.com/tns/incidents?domain_name=piracy-site.org&tld_name=org&registrar_name=acme-registrar&type=copyright&resolved_date=2024-01-20T14:30:00Z&resolved_note=DMCA+takedown+processed\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Abuse Reporting**: Record external abuse reports\n- **Automated Detection**: Log programmatically detected abuse\n- **Compliance**: Maintain audit trail of abuse handling\n- **Coordination**: Track incidents requiring registrar/law enforcement coordination\n- **Statistics**: Build abuse metrics for reporting\n\n## Response\n\nReturns the newly created incident ID for future reference and updates.","operationId":"post_incidents_tns_incidents_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"resolved_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"Resolved Date"}},{"name":"resolved_note","in":"query","required":true,"schema":{"type":"string","title":"Resolved Note"}},{"name":"domain_name","in":"query","required":false,"schema":{"type":"string","title":"Domain Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"type":"string","title":"Tld Name"}},{"name":"registrar_name","in":"query","required":false,"schema":{"type":"string","title":"Registrar Name"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","title":"Type"}},{"name":"first_seen_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen Date"}},{"name":"last_seen_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen Date"}}],"responses":{"200":{"description":"Incident created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":12346}]}}}},"400":{"description":"Invalid parameters or missing required fields"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires abuse:rw role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Trust and Safety - Domains"],"summary":"Put Incidents","description":"Trust and Safety: Update abuse-related incidents","operationId":"put_incidents_tns_incidents_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"resolved_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"Resolved Date"}},{"name":"resolved_note","in":"query","required":true,"schema":{"type":"string","title":"Resolved Note"}},{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"domain_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"}},{"name":"tld_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tld Name"}},{"name":"registrar_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Name"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"first_seen_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen Date"}},{"name":"last_seen_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/incidents/types":{"get":{"tags":["Trust and Safety - Domains"],"summary":"Get Incident Types","description":"Trust and Safety: List known incident types\n\nEnumerate incident types known to the system.","operationId":"get_incident_types_tns_incidents_types_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Trust and Safety - Domains"],"summary":"Post Incident Types","description":"Trust and Safety: Add new incident types\n\nAdd to the list of incident types known to the system.","operationId":"post_incident_types_tns_incidents_types_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"type":"string","default":"","title":"Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Trust and Safety - Domains"],"summary":"Put Incident Types","description":"Trust and Safety: Update incident types\n\nUpdate specific incident types known to the system.","operationId":"put_incident_types_tns_incidents_types_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trust and Safety - Domains"],"summary":"Delete Incident Types","description":"Trust and Safety: Update incident types\n\nUpdate specific incident types known to the system.","operationId":"delete_incident_types_tns_incidents_types_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/{domain}/abuse":{"post":{"tags":["Trust and Safety - TLDs"],"summary":"Suspend Domain for Abuse","description":"Suspend a domain for abuse.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `abuse:rw` (Abuse Read-Write)\n\n## Description\n\nImmediately suspends a domain for abuse by applying the `server_abuse_suspension`\nattribute, which adds serverHold status to prevent DNS resolution.\n\n## Path Parameters\n\n- **tld**: TLD of the domain (e.g., \"com\", \"net\")\n- **domain**: Full domain name to suspend (e.g., \"malicious-site.com\")\n\n## Query Parameters\n\n- **reason** (required): Description of the abuse (ticket ID, incident description)\n  - Stored in domain notes and external_ticket_id\n\n## Deprecated Query Parameters\n\n- **notify_registrar**: No longer used. The value is silently ignored and\n  will be removed in a future release.\n\n## Actions Performed\n\n1. **Domain Attribute**: Applies `server_abuse_suspension` attribute\n2. **EPP Status**: Adds `serverHold` status (prevents DNS resolution)\n3. **Domain Note**: Creates abuse note with reason\n4. **Ticket ID**: Sets external_ticket_id on domain\n\n## Usage Examples\n\n```bash\ncurl -X POST \"https://api.example.com/tns/domain/com/phishing-site.com/abuse?reason=Phishing+attack+TKT-12345\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Emergency Takedown**: Immediate suspension for active threats\n- **Phishing Response**: Quick response to phishing reports\n- **Malware Distribution**: Stop malware delivery\n- **Court Orders**: Comply with legal takedown orders\n- **ICANN Compliance**: Emergency actions under ICANN policies\n\n## Response\n\nReturns suspension details including:\n- Suspension timestamps\n- Applied attribute information\n\n## Deprecated Response Fields\n\n- **epp_notification_id**: Always `null`. \n    The endpoint no longer forwards the reason to the registrar,\n    so no EPP notification id is produced.\n\nTo remove the suspension, use DELETE /{tld}/{domain}/abuse","operationId":"post_tld_domain_abuse_tns_domain__tld___domain__abuse_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"reason","in":"query","required":true,"schema":{"type":"string","title":"Reason"}},{"name":"notify_registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Deprecated and ignored. The endpoint no longer forwards the reason to the registrar.","deprecated":true,"title":"Notify Registrar"},"description":"Deprecated and ignored. The endpoint no longer forwards the reason to the registrar.","deprecated":true}],"responses":{"200":{"description":"Domain suspended successfully.\n\n**Note:** `epp_notification_id` is **deprecated** and always `null`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"alert_date":"2024-01-15T10:30:00","domain_name":"malicious-site.com","reason":"Phishing activity reported","suspension_attribute":"server_abuse_suspension","suspension_start":"2024-01-15T10:30:00"}]}}}},"400":{"description":"Invalid domain or TLD"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires abuse:rw role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trust and Safety - TLDs"],"summary":"Delete Tld Domain Abuse","description":"Trust and Safety:\n\nThis closes an abuse report.","operationId":"delete_tld_domain_abuse_tns_domain__tld___domain__abuse_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/{domain}/lock":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Domain Lock","description":"Trust and Safety:\n\nCheck a registry lock. A GET request to this URI can be used to determine if a domain is subject to a registry lock.","operationId":"get_tld_domain_lock_tns_domain__tld___domain__lock_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Trust and Safety - TLDs"],"summary":"Apply Registry Lock","description":"Apply a registry lock to protect high-value domains from unauthorized changes.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `abuse:rw` (Abuse Read-Write)\n\n## Description\n\nApplies a registry lock to a domain, which adds multiple serverProhibited EPP\nstatus codes to prevent unauthorized transfers, updates, and deletions. This\nis typically used for high-value domains or domains under legal protection.\n\n## Path Parameters\n\n- **tld**: TLD of the domain (e.g., \"com\", \"net\")\n- **domain**: Full domain name to lock (e.g., \"valuable-brand.com\")\n\n## Query Parameters\n\n- **reason** (required): Justification for the registry lock\n  - Examples: \"Brand protection\", \"Court order\", \"High-value asset\"\n  - Stored with the lock for audit purposes\n\n## EPP Status Codes Applied\n\nRegistry lock adds these EPP status codes:\n- **serverTransferProhibited**: Prevents domain transfers\n- **serverUpdateProhibited**: Prevents domain updates\n- **serverDeleteProhibited**: Prevents domain deletion\n\n## Usage Examples\n\n```bash\n# Lock high-value brand domain\ncurl -X POST \"https://api.example.com/tns/domain/com/valuable-brand.com/lock?reason=Brand+protection+request\" \\\n  -H \"Authorization: Bearer <token>\"\n\n# Lock domain under legal order\ncurl -X POST \"https://api.example.com/tns/domain/net/contested-domain.net/lock?reason=Court+order+2024-123\" \\\n  -H \"Authorization: Bearer <token>\"\n```\n\n## Use Cases\n\n- **Brand Protection**: Secure high-value trademark domains\n- **Legal Holds**: Prevent changes during disputes\n- **VIP Accounts**: Extra protection for premium customers\n- **Regulatory Compliance**: Meet regulatory requirements\n- **Security**: Protect against unauthorized transfers\n\n## Related Endpoints\n\n- **GET /{tld}/{domain}/lock**: Check if domain is locked\n- **DELETE /{tld}/{domain}/lock**: Remove registry lock\n\n## Important Notes\n\n- Lock prevents ALL modifications including by the registrar\n- Removal typically requires authentication and authorization\n- Check registry lock status before attempting to remove\n- Lock is indefinite until explicitly removed","operationId":"post_tld_domain_lock_tns_domain__tld___domain__lock_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"reason","in":"query","required":true,"schema":{"type":"string","title":"Reason"}}],"responses":{"200":{"description":"Registry lock applied successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"domain_name":"high-value-domain.com","attribute":"registry_lock","rationale":"High-value domain protection","date_range":"[2024-01-15 10:30:00, infinity)"}]}}}},"400":{"description":"Invalid domain, TLD, or lock already exists"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires abuse:rw role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trust and Safety - TLDs"],"summary":"Delete Tld Domain Lock","description":"Trust and Safety:\n\nRemove a registry lock. A DELETE request to this URI will remove a Registry Lock from the domain.","operationId":"delete_tld_domain_lock_tns_domain__tld___domain__lock_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/deleted":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Deleted","description":"Trust and Safety:\n\nGet a list of deleted domains from the last synced date or for\nconfirmation. A GET request to this URI will return a list of\ndeleted domains.","operationId":"get_tld_deleted_tns_domain__tld__deleted_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"deleted_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted After"}},{"name":"deleted_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted Before"}},{"name":"expired_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired After"}},{"name":"expired_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired Before"}},{"name":"agp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agp"}},{"name":"noagp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Noagp"}},{"name":"roid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/transactions":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Transactions","description":"Trust and Safety:\n\nA GET request to this URI retrieves information about billable\ntransactions.","operationId":"get_tld_transactions_tns_domain__tld__transactions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},{"name":"roid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roid"}},{"name":"transaction_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transaction Id"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"settled_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settled After"}},{"name":"settled_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settled Before"}},{"name":"grace_period_ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends After"}},{"name":"grace_period_ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends Before"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar"}},{"name":"uncredited","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Uncredited"}},{"name":"settled","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Settled"}},{"name":"promotion","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Promotion"}},{"name":"created_after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created After Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/{domain}/transactions":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Domain Transactions","description":"Trust and Safety:\n\nGet transaction information of a given domain in case of missing or stale\nregistrar, registrant details","operationId":"get_tld_domain_transactions_tns_domain__tld___domain__transactions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/alerts":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Alerts","description":"Trust and Safety:\n\nGet a list abuse alerts","operationId":"get_tld_alerts_tns_domain__tld__alerts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/registrar/{id}":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Registrar Id","description":"Trust and Safety:\n\nGet specific registrar information.","operationId":"get_tld_registrar_id_tns_domain__tld__registrar__id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/registrars":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Registrars","description":"Trust and Safety:\n\nGet registrar information. A GET request to this URI will retrieve a list\nof registrars.","operationId":"get_tld_registrars_tns_domain__tld__registrars_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"cc","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cc"}},{"name":"iana_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iana Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tns/domain/{tld}/domains":{"get":{"tags":["Trust and Safety - TLDs"],"summary":"Get Tld Domains","description":"Trust and Safety:\n\nGet a list of domains with various filters","operationId":"get_tld_domains_tns_domain__tld__domains_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld","in":"path","required":true,"schema":{"type":"string","title":"Tld"}},{"name":"locked","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked"}},{"name":"idn","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idn"}},{"name":"rgp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rgp"}},{"name":"registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar"}},{"name":"registrar_iana_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar Iana Id"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created Before"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created After"}},{"name":"expires_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires Before"}},{"name":"expires_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires After"}},{"name":"created_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},{"name":"client_hold","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Hold"}},{"name":"client_update_prohibited","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Update Prohibited"}},{"name":"client_delete_prohibited","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Delete Prohibited"}},{"name":"client_renew_prohibited","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Renew Prohibited"}},{"name":"client_transfer_prohibited","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Transfer Prohibited"}},{"name":"matching","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching"}},{"name":"restored_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Restored Since"}},{"name":"created_after_roid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created After Roid"}},{"name":"registrant_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Email"}},{"name":"registrant_name_matching","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Name Matching"}},{"name":"registrant_pc","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Pc"}},{"name":"registrant_cc","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Cc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token/":{"post":{"tags":["Authentication"],"summary":"Authenticate User","description":"Authenticate with username and password to obtain a JWT access token.\n\n## Authentication Flow\n\nThis endpoint authenticates users and returns a JWT token that must be included\nin subsequent API requests. The token is IP-bound and will only work from the\nsame IP address that requested it.\n\n## Request Body\n\nUses OAuth2 password flow format (form-urlencoded):\n- **username**: Your API username\n- **password**: Your API password\n\n## Response\n\nReturns a JWT token valid for 24 hours (1440 minutes) that includes:\n- User's username\n- User's IP address (bound to token)\n- Expiration timestamp\n\n## Security Features\n\n- **Password Verification**: Uses bcrypt hashing for secure password validation\n- **IP Whitelisting**: Only whitelisted IP addresses can authenticate\n- **Disabled User Check**: Accounts can be disabled by administrators\n- **IP Binding**: Token is bound to the requesting IP address\n- **Audit Logging**: All authentication attempts are logged\n\n## Error Cases\n\n- **401 Unauthorized**: Invalid username or password\n- **403 Forbidden**: User account is disabled OR IP address not whitelisted\n\n## Usage Example\n\n```bash\ncurl -X POST \"https://api.example.com/token/\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"username=myuser&password=mypassword\"\n```\n\nThen use the returned token in subsequent requests:\n```bash\ncurl -X GET \"https://api.example.com/domains/\" \\\n  -H \"Authorization: Bearer <access_token>\"\n```","operationId":"login_token__post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_token__post"}}},"required":true},"responses":{"200":{"description":"Successful authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","token_type":"bearer"}}}},"401":{"description":"Invalid username or password"},"403":{"description":"User disabled or IP address not whitelisted"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token/pw":{"post":{"tags":["Authentication"],"summary":"Change Password","description":"Change password for the authenticated user.\n\n## Authentication Required\n\nThis endpoint requires a valid JWT token in the Authorization header.\n\n## Password Policy\n\nPasswords must meet the following complexity requirements:\n- **Minimum length**: 12 characters\n- **Uppercase letters**: At least 1\n- **Numbers**: At least 1\n- **Special characters**: At least 1\n- **Non-letter characters**: At least 1\n\n## Request Body\n\n- **password** (required): The new password that meets complexity requirements\n\n## Response\n\nReturns a success message with status 200 if password was changed successfully.\n\n## Error Cases\n\n- **400 Bad Request**: Password does not meet complexity requirements\n  - Response includes specific requirements that failed\n- **401 Unauthorized**: Missing or invalid authentication token\n- **422 Unprocessable Entity**: Invalid request body format\n\n## Security Features\n\n- Password sent in request body (not query param) to avoid logging\n- Uses bcrypt with salt for password hashing\n- Validates password complexity before accepting change\n- Audit logs password change events\n- Only allows authenticated users to change their own password\n\n## Usage Example\n\n```bash\ncurl -X POST \"https://api.example.com/token/pw\" \\\n  -H \"Authorization: Bearer <access_token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"password\": \"MyNewP@ssw0rd123\"}'\n```","operationId":"change_pw_token_pw_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}},"required":true},"responses":{"200":{"description":"Password changed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"Password changed successfully"}}}},"400":{"description":"Password does not meet complexity requirements"},"401":{"description":"Invalid or missing authentication token"},"422":{"description":"Invalid request body"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/token/me":{"get":{"tags":["Authentication"],"summary":"Get Current User Profile","description":"Get the profile information of the currently authenticated user.\n\n## Authentication Required\n\nThis endpoint requires a valid JWT token in the Authorization header.\n\n## Response\n\nReturns the user's profile information including:\n- **id**: User's unique identifier\n- **real_name**: User's full name\n- **email**: User's email address\n- **username**: User's username\n- **roles**: Dictionary of user's roles and permissions\n\n## Usage Example\n\n```bash\ncurl -X GET \"https://api.example.com/token/me\" \\\n  -H \"Authorization: Bearer <access_token>\"\n```","operationId":"get_me_token_me_get","responses":{"200":{"description":"User profile retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"},"example":{"status":200,"ok":true,"msg":"User profile retrieved successfully","data":{"id":1,"real_name":"John Doe","email":"john.doe@example.com","username":"johndoe","roles":{"ops":"rw","finances":"ro"}}}}}},"401":{"description":"Invalid or missing authentication token"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/transactions/billable":{"post":{"tags":["Transactions"],"summary":"List Billable Transactions","description":"List billable transactions for financial reporting and reconciliation.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `finances:ro` (Financial Read-Only) or higher\n\n## Description\n\nRetrieves daily billable transactions for accounting, invoicing, and financial\nreconciliation. Includes all domain operations that generate revenue or costs.\n\n## Request Body\n\nPOST body accepts a JSON object with the following fields:\n- **from_date** (required): Start date for transactions (ISO 8601)\n- **to_date** (optional): End date (defaults to NOW if omitted)\n- **promo_name** (optional): Filter by promotional campaign name\n- **promo_id** (optional): Filter by promotional campaign ID\n- **tlds** (optional): Array of TLD names to include\n- **registrars** (optional): Array of registrar names to include\n- **operations** (optional): Array of operation codes (domreg, domren, etc.)\n\n## Response Fields\n\nEach transaction includes:\n- **id**: Unique transaction identifier\n- **transaction_date_ts**: Transaction timestamp\n- **registrar_name**: Registrar that performed the operation\n- **tld_name**: TLD of the domain\n- **operation**: Operation code (domreg, domren, domtrn, etc.)\n- **operation_descr**: Human-readable operation description\n- **domain_name**: Domain name involved\n- **unit_count**: Number of years (for multi-year operations)\n- **total_price**: Total transaction amount\n- **tier**: Pricing tier applied\n- **promo_name**: Promotional campaign name (if applicable)\n- **promo_id**: Promotional campaign ID (if applicable)\n\n## Usage Examples\n\n```bash\n# Get all transactions for a date range\ncurl -X POST \"https://api.example.com/transactions/billable\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from_date\": \"2024-01-01T00:00:00Z\",\n    \"to_date\": \"2024-01-31T23:59:59Z\"\n  }'\n\n# Filter by specific registrar\ncurl -X POST \"https://api.example.com/transactions/billable\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from_date\": \"2024-01-01T00:00:00Z\",\n    \"registrars\": [\"acme-registrar\"]\n  }'\n\n# Filter by TLDs and operations\ncurl -X POST \"https://api.example.com/transactions/billable\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from_date\": \"2024-01-01T00:00:00Z\",\n    \"tlds\": [\"com\", \"net\"],\n    \"operations\": [\"domreg\", \"domren\"]\n  }'\n\n# Filter by promotional campaign\ncurl -X POST \"https://api.example.com/transactions/billable\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from_date\": \"2024-01-01T00:00:00Z\",\n    \"promo_name\": \"Q1-2024-Discount\"\n  }'\n```\n\n## Use Cases\n\n- **Invoicing**: Generate monthly invoices for registrars\n- **Revenue Reporting**: Calculate revenue by TLD, registrar, or operation\n- **Reconciliation**: Match transactions with external accounting systems\n- **Promotional Analysis**: Assess impact of promotional campaigns\n- **Financial Auditing**: Provide transaction details for auditors","operationId":"billable_transactions_billable_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billable"}}}},"responses":{"200":{"description":"Successfully retrieved billable transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"},"example":{"status":200,"ok":true,"msg":"Request completed successfully","data":[{"id":123456,"transaction_date_ts":"2024-01-15T10:30:00","registrar_name":"acme-registrar","tld_name":"com","operation":"domreg","operation_descr":"Domain Registration","domain_name":"example.com","unit_count":1,"total_price":10.0,"tier":"standard"}],"pager":{"total_entries":5000,"entries_per_page":100,"current_page":1}}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires finances:ro role)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transactions/renewals":{"get":{"tags":["Transactions"],"summary":"Renewals","description":"Returns the daily billable transactions, given a from/to date.\n\nIf the `to_date` parameter is skipped, NOW() will be used instead.\n\n`registrar` can be used to restrict the results to those operations\nbelonging to a specific registrar.","operationId":"renewals_transactions_renewals_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"registrar","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transactions/reconcile":{"post":{"tags":["Transactions"],"summary":"Erp Transactions","description":"Report for Reconciliacions","operationId":"erp_transactions_transactions_reconcile_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReconcileField"},{"type":"null"}],"default":"uid","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredReconcileField"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/create":{"post":{"tags":["Batch Uploads"],"summary":"Create Batch Upload","description":"Create a new batch upload for bulk domain operations.\n\n## Authentication & Permissions\n\n- **Authentication**: Required (JWT token)\n- **Role Required**: `uploadBatch:rw` (Batch Upload Read-Write)\n\n## Description\n\nCreates a new batch upload for processing bulk domain lists. Supports uploading\nCSV files containing domain names with pricing tiers or reservation configurations.\nThe file is processed asynchronously in the background.\n\n## Form Parameters\n\n- **name** (required): Unique batch identifier name\n- **tld_name** (required): TLD this batch applies to (e.g., \"com\", \"net\")\n- **type** (optional): Batch type, one of:\n  - **premium**: Premium domain pricing (default)\n  - **reserved**: Reserved domain names\n- **file** (optional): CSV file upload\n  - Format depends on batch type\n  - Can include pricing information\n- **activation_date** (optional): When this batch becomes active (ISO 8601)\n  - Future date schedules activation\n  - Null/omitted activates immediately\n- **with_header** (optional): Whether CSV file has header row (default: true)\n- **target_restriction_id** (optional): Restriction ID for reserved domains\n\n## CSV File Format\n\n### Premium Batch CSV\n```csv\ndomain_name,registration_fee,renewal_fee\npremium-domain.com,500.00,500.00\nvip-name.com,1000.00,800.00\n```\n\n### Reserved Batch CSV\n```csv\ndomain_name\nreserved-name.com\ntrademark-name.com\n```\n\n## Processing Workflow\n\n1. **Upload**: File uploaded and batch record created\n2. **Validation**: Background task validates domains, checks availability, detects duplicates\n3. **Review**: Use GET /{batch_id}/entries to review validation results\n4. **Promotion**: Use POST /{batch_id}/promote to activate the batch\n5. **Activation**: Batch becomes active on activation_date\n\n## Validation Checks\n\nThe system performs the following validations:\n- **Domain format**: Valid domain name structure\n- **TLD match**: Domain TLD matches batch TLD\n- **Availability**: Domain availability status\n- **Duplicates**: Duplicate domains within batch\n- **IDN validation**: Internationalized domain name compliance\n- **Restrictions**: Checks against existing restrictions\n- **Pricing**: Validates pricing tier configurations\n\n## Usage Examples\n\n```bash\n# Create premium batch with immediate activation\ncurl -X POST \"https://api.example.com/batch/create\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -F \"name=premium-Q1-2024\" \\\n  -F \"tld_name=com\" \\\n  -F \"type=premium\" \\\n  -F \"file=@premium-domains.csv\"\n\n# Create reserved batch with scheduled activation\ncurl -X POST \"https://api.example.com/batch/create\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -F \"name=reserved-trademark-2024\" \\\n  -F \"tld_name=com\" \\\n  -F \"type=reserved\" \\\n  -F \"activation_date=2024-12-01T00:00:00Z\" \\\n  -F \"file=@reserved-domains.csv\"\n\n# Create empty batch (add domains later via update)\ncurl -X POST \"https://api.example.com/batch/create\" \\\n  -H \"Authorization: Bearer <token>\" \\\n  -F \"name=premium-batch-empty\" \\\n  -F \"tld_name=net\" \\\n  -F \"type=premium\"\n```\n\n## Error Handling\n\nCommon validation errors:\n- **\"batch name must be unique\"**: Name already exists, choose different name\n- **\"invalid character in file\"**: File encoding issue, use UTF-8\n- **\"invalid file format\"**: CSV format error, check delimiter and structure\n- **\"referenced value does not exist\"**: Invalid TLD or restriction ID\n- **\"missing required field\"**: Required columns missing from CSV\n\n## Use Cases\n\n- **Premium Pricing**: Upload custom pricing for premium domains\n- **Domain Reservations**: Reserve domains for trademark protection\n- **Scheduled Launches**: Prepare domain lists for future launches\n- **Bulk Updates**: Update pricing for multiple domains at once\n- **Sunrise Periods**: Manage sunrise period eligibility lists\n\n## Response\n\nReturns the newly created batch ID. Use this ID to:\n- Check processing status: GET /{batch_id}\n- Review validation results: POST /{batch_id}/entries\n- Promote to production: POST /{batch_id}/promote","operationId":"create_batch_upload_create_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}},{"name":"tld_name","in":"query","required":true,"schema":{"type":"string","title":"Tld Name"}},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BatchType","default":"premium"}},{"name":"activation_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"}},{"name":"with_header","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"With Header"}},{"name":"target_restriction_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Restriction Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_batch_upload_create_post"}}}},"responses":{"200":{"description":"Batch created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"},"example":{"status":200,"ok":true,"msg":"batch 123 created","data":[{"id":123}]}}}},"400":{"description":"Validation error (invalid file format, unique constraint violation, etc.)"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permissions (requires uploadBatch:rw role)"},"500":{"description":"Unexpected server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/update/{batch_id}":{"patch":{"tags":["Batch Uploads"],"summary":"Update Batch","operationId":"update_batch_upload_update__batch_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"activation_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"}},{"name":"with_header","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"With Header"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_batch_upload_update__batch_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/list":{"post":{"tags":["Batch Uploads"],"summary":"Upload Batch List","description":"List all batches","operationId":"upload_batch_list_upload_list_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UploadBatchFields"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredUploadBatch"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/{batch_id}":{"get":{"tags":["Batch Uploads"],"summary":"Get Batch","description":"Get a batch by id","operationId":"get_batch_upload__batch_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Batch Uploads"],"summary":"Delete Batch","description":"Delete a batch by id","operationId":"delete_batch_upload__batch_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/{batch_id}/refresh":{"post":{"tags":["Batch Uploads"],"summary":"Refresh","description":"Refresh a batch","operationId":"refresh_upload__batch_id__refresh_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/{batch_id}/entries":{"post":{"tags":["Batch Uploads"],"summary":"Get Entries","description":"Get entries for a batch","operationId":"get_entries_upload__batch_id__entries_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"rows","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Rows"}},{"name":"csv","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Csv"}},{"name":"skip_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Count"}},{"name":"sort_field","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EntriesFields"},{"type":"null"}],"default":"id","title":"Sort Field"}},{"name":"sort_ascending","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sort Ascending"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FilteredEntries"}},{"type":"null"}],"title":"Filtered"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponsePaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/{batch_id}/promote":{"post":{"tags":["Batch Uploads"],"summary":"Promote","description":"Promote a batch to premium","operationId":"promote_upload__batch_id__promote_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload/{batch_id}/demote":{"post":{"tags":["Batch Uploads"],"summary":"Demote","description":"Demote a batch that has already been promoted","operationId":"demote_upload__batch_id__demote_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/config/":{"get":{"tags":["Instance Configuration"],"summary":"Get Config","description":"Get the status of the backend services","operationId":"get_config_config__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/config/{tld_name}":{"get":{"tags":["Instance Configuration"],"summary":"Get Tld Config","description":"Get the status of the backend services","operationId":"get_tld_config_config__tld_name__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tld_name","in":"path","required":true,"schema":{"type":"string","title":"Tld Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rba/users/{user_id}":{"get":{"tags":["Role Based Access"],"summary":"Lookup user privileges","description":"Return a user's core profile information along with every privilege derived from their group memberships.","operationId":"get_user_privileges_rba_users__user_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rba/me/privileges":{"get":{"tags":["Role Based Access"],"summary":"List my privileges","description":"Return the privilege names granted to the currently logged-in user along with the group names they belong to","operationId":"get_current_user_privileges_rba_me_privileges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/rba/groups/{group_id}":{"get":{"tags":["Role Based Access"],"summary":"Lookup group privileges","description":"Given group id, return its identifying information and the privileges assigned to that group.","operationId":"get_group_privileges_rba_groups__group_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIResponse":{"properties":{"status":{"type":"integer","title":"Status"},"ok":{"type":"boolean","title":"Ok"},"msg":{"type":"string","title":"Msg"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","ok","msg"],"title":"APIResponse"},"APIResponsePaginated":{"properties":{"status":{"type":"integer","title":"Status"},"ok":{"type":"boolean","title":"Ok"},"msg":{"type":"string","title":"Msg"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data"},"pager":{"anyOf":[{"$ref":"#/components/schemas/DataPager"},{"type":"null"}]},"sorted":{"anyOf":[{"$ref":"#/components/schemas/OrderedResult"},{"type":"null"}]}},"type":"object","required":["status","ok","msg","pager","sorted"],"title":"APIResponsePaginated"},"BalanceAdjustment":{"properties":{"amount":{"type":"number","title":"Amount"},"category":{"$ref":"#/components/schemas/BalanceAdjustmentCategory"},"note":{"type":"string","title":"Note","default":""},"apply_date":{"type":"string","format":"date-time","title":"Apply Date","default":"2026-11-24T20:24:06.338208Z"},"document_id":{"type":"string","title":"Document Id"},"detail":{"anyOf":[{"items":{"$ref":"#/components/schemas/BalanceAdjustmentDetail"},"type":"array"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["amount","category"],"title":"BalanceAdjustment"},"BalanceAdjustmentCategory":{"type":"string","enum":["rebate","refund","credit","payment","adjustment","rollover_credit","balance_transfer","general_sales"],"title":"BalanceAdjustmentCategory"},"BalanceAdjustmentDetail":{"properties":{"tld":{"type":"string","title":"Tld"},"adjustment_type":{"$ref":"#/components/schemas/BalanceAdjustmentType"},"amount":{"type":"number","title":"Amount"},"is_premium":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Premium","default":false},"domain_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Domain Count","default":0}},"type":"object","required":["tld","adjustment_type","amount"],"title":"BalanceAdjustmentDetail"},"BalanceAdjustmentFields":{"type":"string","enum":["id","created_date","registrar_name","external_id","note","amount","apply_date","category","category_descr","affects_revenue","invoice_visible","detail","registrar_company_name","registrar_iana_id","registrar_billing_id","registrar_descr"],"title":"BalanceAdjustmentFields","description":"This is the list of fields that we can sort and filter on.\n\nThe fields come from the materialized view: `batches.v_batch_{batch_id}_check`"},"BalanceAdjustmentType":{"type":"string","enum":["sunrise-revenue","volume-d-revenue","reg-revenue","xfer-gain-revenue","excess-d-revenue","renew-ex-revenue","restore-revenue","renew-au-revenue"],"title":"BalanceAdjustmentType"},"BatchType":{"type":"string","enum":["premium","reserved"],"title":"BatchType"},"Billable":{"properties":{"from_date":{"type":"string","format":"date-time","title":"From Date"},"to_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"},"promo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Name"},"promo_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Promo Id"},"tlds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tlds"},"registrars":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Registrars"},"operations":{"anyOf":[{"items":{"$ref":"#/components/schemas/OperationType"},"type":"array"},{"type":"null"}],"title":"Operations"}},"type":"object","required":["from_date"],"title":"Billable"},"Body_create_batch_upload_create_post":{"properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","title":"Body_create_batch_upload_create_post"},"Body_login_token__post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_token__post"},"Body_update_batch_upload_update__batch_id__patch":{"properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","title":"Body_update_batch_upload_update__batch_id__patch"},"DataPager":{"properties":{"total_entries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Entries"},"entries_per_page":{"type":"integer","title":"Entries Per Page"},"current_page":{"type":"integer","title":"Current Page"},"entries_on_this_page":{"type":"integer","title":"Entries On This Page"},"offset":{"type":"integer","title":"Offset"},"first_page":{"type":"integer","title":"First Page"},"first":{"type":"integer","title":"First"},"last":{"type":"integer","title":"Last"},"previous_page":{"type":"integer","title":"Previous Page"},"next_page":{"type":"integer","title":"Next Page"},"last_page":{"type":"integer","title":"Last Page"},"has_next_page":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Next Page"}},"type":"object","required":["entries_per_page","current_page","entries_on_this_page","offset"],"title":"DataPager"},"DeletedDomain":{"type":"string","enum":["deleted_date","purged_date","domain_name","tld_name","domain_roid","registrar_name"],"title":"DeletedDomain","description":"This is the list of fields that we can sort and filter on."},"DiscountType":{"type":"string","enum":["fixedDiscount","percentage","targetPrice"],"title":"DiscountType"},"DomainAttribute":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tlds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tlds"},"server_hold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Server Hold","default":false},"server_delete_prohibited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Server Delete Prohibited","default":false},"server_renew_prohibited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Server Renew Prohibited","default":false},"server_transfer_prohibited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Server Transfer Prohibited","default":false},"server_update_prohibited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Server Update Prohibited","default":false}},"type":"object","required":["name","description"],"title":"DomainAttribute"},"DomainHistory":{"type":"string","enum":["domain_name","domain_roid","event_date","event_type","event_data"],"title":"DomainHistory","description":"This is the list of fields that we can sort and filter on."},"DomainServerStatus":{"properties":{"name":{"$ref":"#/components/schemas/DomainServerStatusName"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","default":"Added by Registry Operator"}},"type":"object","required":["name"],"title":"DomainServerStatus","description":"Domain Server Status"},"DomainServerStatusName":{"type":"string","enum":["serverRenewProhibited","serverHold","serverDeleteProhibited","serverTransferProhibited","serverUpdateProhibited"],"title":"DomainServerStatusName","description":"List of Server Status"},"DomainServerStatusRequest":{"properties":{"add":{"anyOf":[{"items":{"$ref":"#/components/schemas/DomainServerStatus"},"type":"array"},{"type":"null"}],"title":"Add"},"rem":{"anyOf":[{"items":{"$ref":"#/components/schemas/DomainServerStatusName"},"type":"array"},{"type":"null"}],"title":"Rem"}},"type":"object","title":"DomainServerStatusRequest"},"DomainSpecicicPricing":{"type":"string","enum":["type","tld_name","domain_name","tier_name","from_date","to_date","registration","renewal","restore_autorenew","transfer","premium_fee","active"],"title":"DomainSpecicicPricing","description":"This is the list of fields that we can sort and filter on."},"DomainSpecificPricingFiltered":{"properties":{"field":{"$ref":"#/components/schemas/DomainSpecicicPricing"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"DomainSpecificPricingFiltered"},"EntriesFields":{"type":"string","enum":["id","name","is_valid","is_valid_tld","pass_idn_check","is_tldre_restricted","is_idn_variant","is_registered","is_restricted_domain","is_restricted_word","is_restricted_regexp","is_uniep_blocked","is_on_extended_sunrise","is_pending","is_available","reason","tld_name","duplicates","tier_name","bad_tld_for_file","is_system_restricted","has_errors","has_price_mismatch","entry_needs_attention"],"title":"EntriesFields","description":"This is the list of fields that we can sort and filter on.\n\nThe fields come from the materialized view: `batches.v_batch_{batch_id}_check`"},"FilterOperator":{"type":"string","enum":["=","!=",">",">=","<","<=","like","ilike","in","not in","is null","is not null","~*","~","!~*","!~"],"title":"FilterOperator"},"FilteredBalanceAdjustments":{"properties":{"field":{"$ref":"#/components/schemas/BalanceAdjustmentFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredBalanceAdjustments"},"FilteredDeletedDomain":{"properties":{"field":{"$ref":"#/components/schemas/DeletedDomain"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredDeletedDomain"},"FilteredDomainHistory":{"properties":{"field":{"$ref":"#/components/schemas/DomainHistory"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredDomainHistory"},"FilteredEntries":{"properties":{"field":{"$ref":"#/components/schemas/EntriesFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredEntries"},"FilteredPendingDomainList":{"properties":{"field":{"$ref":"#/components/schemas/PendingDomainList"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPendingDomainList"},"FilteredPremium":{"properties":{"field":{"$ref":"#/components/schemas/PremiumFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPremium"},"FilteredPricingConfig":{"properties":{"field":{"$ref":"#/components/schemas/PricingConfig"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPricingConfig"},"FilteredPromo":{"properties":{"field":{"$ref":"#/components/schemas/PromoField"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPromo"},"FilteredPromoTransaction":{"properties":{"field":{"$ref":"#/components/schemas/PromoTransactionField"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPromoTransaction"},"FilteredPurgedNames":{"properties":{"field":{"$ref":"#/components/schemas/PurgedNamesFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredPurgedNames"},"FilteredReconcileField":{"properties":{"field":{"$ref":"#/components/schemas/ReconcileField"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredReconcileField"},"FilteredRegistrarList":{"properties":{"field":{"$ref":"#/components/schemas/RegistrarList"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredRegistrarList"},"FilteredRestriction":{"properties":{"field":{"$ref":"#/components/schemas/RestrictionFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredRestriction"},"FilteredRestrictionEntries":{"properties":{"field":{"$ref":"#/components/schemas/RestrictionEntriesFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredRestrictionEntries"},"FilteredStickyColumns":{"properties":{"field":{"$ref":"#/components/schemas/StickyColumns"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredStickyColumns"},"FilteredUploadBatch":{"properties":{"field":{"$ref":"#/components/schemas/UploadBatchFields"},"operator":{"$ref":"#/components/schemas/FilterOperator","default":"="},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"FilteredUploadBatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OperationType":{"type":"string","enum":["create","renew","transfer","restore","balance_adjustment"],"title":"OperationType"},"OrderedResult":{"properties":{"sort_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Field"},"sort_ascending":{"type":"boolean","title":"Sort Ascending","default":true}},"type":"object","title":"OrderedResult"},"PasswordChangeRequest":{"properties":{"password":{"type":"string","title":"Password","description":"New password (min 12 chars, 1 uppercase, 1 number, 1 special char)"}},"type":"object","required":["password"],"title":"PasswordChangeRequest","description":"Request model for password change"},"PendingDomainAction":{"type":"string","enum":["approved","rejected"],"title":"PendingDomainAction","description":"List of Pending Domain Actions"},"PendingDomainList":{"type":"string","enum":["domain_roid","domain_name","domain_uname","tld_name","registrant","tech_contacts","admin_contacts","billing_contacts","registrar_name","registrar_company_name","registrar_description","period","period_unit","idn_table","notes","created_date","updated_date","status_name","status_description","status_is_final","flagged_pre_verification"],"title":"PendingDomainList","description":"This is the list of fields that we can sort and filter on."},"PremiumFields":{"type":"string","enum":["type","tld_name","domain_name","tier_name","from_date","to_date","registration","renewal","restore_autorenew","transfer","premium_fee","active"],"title":"PremiumFields","description":"This is the list of fields that we can sort and filter on."},"PricingConfig":{"type":"string","enum":["id","type","tld_name","registrar_name","operation_name","operation_descr","operation_id","price","since_date","until_date","is_current","is_expired","in_future"],"title":"PricingConfig"},"PromoCreate":{"properties":{"name":{"type":"string","maxLength":150,"title":"Name"},"description":{"type":"string","title":"Description"},"starts":{"type":"string","format":"date-time","title":"Starts"},"ends":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends"},"types":{"items":{"$ref":"#/components/schemas/PromoType"},"type":"array","title":"Types"},"discount_type":{"$ref":"#/components/schemas/DiscountType"},"tiers":{"items":{"type":"string"},"type":"array","title":"Tiers","default":["default"]},"registrars":{"anyOf":[{"items":{"$ref":"#/components/schemas/PromoRegistrar"},"type":"array"},{"type":"null"}],"title":"Registrars"},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount"},"target_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Price"},"is_sticky":{"type":"boolean","title":"Is Sticky","default":false},"sticky_survives_transfer":{"type":"boolean","title":"Sticky Survives Transfer","default":false},"periods":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Periods"},"allow_multiuse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Multiuse","default":false},"per_transaction":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Per Transaction","default":false},"all_registrars":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All Registrars","default":false},"all_premium_tiers":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All Premium Tiers","default":false}},"type":"object","required":["name","description","starts","ends","types","discount_type"],"title":"PromoCreate","description":"Represents the data required to create a new promotion.\n\nAttributes:\n    name (str): The name of the promotion.\n    description (str): The description of the promotion.\n    starts (datetime.datetime): The start date and time of the promotion.\n    ends (datetime.datetime): The end date and time of the promotion.\n    types (List[PromoType]): The types of the promotion.\n    discount_type (DiscountType): The discount type of the promotion.\n    tiers (List[str]): The tiers associated with the promotion.\n    registrars (List[PromoRegistrar]): The registrars associated with the promotion.\n    discount (float): The discount value of the promotion.\n    is_sticky (bool): indicates whether the renewal price will by `stick` to the domain\n    sticky_survives_transfer (bool): indicates whether the renewal price will `stick` to the domain after a transfer\n\nMethods:\n    save(tld: str, request: Request, user: User) -> int:\n        Saves the new promotion to the database and returns the promotion ID."},"PromoField":{"type":"string","enum":["id","name","description","starts","ends","transactions","types","tiers","periods","discount","target_price","discount_type","registrars","tlds","is_sticky","sticky_survives_transfer","allow_multiuse","per_transaction","all_registrars","all_premium_tiers"],"title":"PromoField"},"PromoRegistrar":{"properties":{"name":{"type":"string","title":"Name"},"starts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts"},"ends":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","default":true}},"type":"object","required":["name"],"title":"PromoRegistrar"},"PromoTransactionField":{"type":"string","enum":["transaction_date","id","object_id","description","unit_count","unit_price","total_price","registrar_name","tld_name","operation_name","operation_id","automatic","operation_type","tier"],"title":"PromoTransactionField"},"PromoType":{"type":"string","enum":["create","renew","transfer"],"title":"PromoType"},"PromoUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"starts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts"},"ends":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends"},"types":{"anyOf":[{"items":{"$ref":"#/components/schemas/PromoType"},"type":"array"},{"type":"null"}],"title":"Types"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/DiscountType"},{"type":"null"}]},"tiers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tiers"},"registrars":{"anyOf":[{"items":{"$ref":"#/components/schemas/PromoRegistrar"},"type":"array"},{"type":"null"}],"title":"Registrars"},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount"},"target_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Price"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"is_sticky":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sticky"},"sticky_survives_transfer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sticky Survives Transfer"},"periods":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Periods"},"allow_multiuse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Multiuse"},"per_transaction":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Per Transaction"},"all_registrars":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All Registrars"},"all_premium_tiers":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All Premium Tiers"}},"type":"object","title":"PromoUpdate","description":"Represents the data required to update a promotion.\n\nAttributes:\n    name (str): The name of the promotion.\n    ends (datetime.datetime): The end date and time of the promotion.\n    types (List[PromoType]): The types of the promotion.\n    discount_type (DiscountType): The discount type of the promotion.\n    applies_to_premiums (bool): Indicates if the promotion applies to premiums.\n    only_applies_to_premiums (bool): Indicates if the promotion only applies to premiums.\n    registrars (List[str]): The registrars associated with the promotion.\n    discount (float): The discount value of the promotion.\n\nMethods:\n    save(tld: str, request: Request, user: User) -> None:\n        Saves the updated promotion to the database."},"PurgedNamesFields":{"type":"string","enum":["name","purged_date","source","restriction_name","restriction_id"],"title":"PurgedNamesFields","description":"This is the list of fields that we can sort and filter on."},"ReconcileField":{"type":"string","enum":["billing_id","source","uid","transaction_date","iana_id","registrar_name","registrar_description","internal_billing_id","tld","domain_name","domain_roid","transaction_years","event_type","amount","currency","price_tier","autorenew","invoice_date"],"title":"ReconcileField"},"RegistrarList":{"type":"string","enum":["name","iana_id","billing_id","descr","company_name","address","city","sp","pc","cc","voice","fax","email","whois_server","referral_url","enabled","read_only","is_supervisor","balance_current","balance_enforce_minimum","balance_notification_threshold","billing_type"],"title":"RegistrarList","description":"Searchable fields for registrar listing.\n\nThese fields can be used for filtering and sorting in the\nPOST /registrar/list endpoint."},"RestrictedDomainList":{"properties":{"names":{"items":{"type":"string"},"type":"array","title":"Names"}},"type":"object","required":["names"],"title":"RestrictedDomainList","description":"Restricted Domain model"},"RestrictedDomainListUpdate":{"properties":{"add":{"anyOf":[{"$ref":"#/components/schemas/RestrictedDomainList"},{"type":"null"}]},"remove":{"anyOf":[{"$ref":"#/components/schemas/RestrictedDomainList"},{"type":"null"}]}},"type":"object","title":"RestrictedDomainListUpdate"},"RestrictedRegexpAdd":{"properties":{"regexp":{"type":"string","title":"Regexp"}},"type":"object","required":["regexp"],"title":"RestrictedRegexpAdd","description":"Restricted Domain model"},"RestrictedWordList":{"properties":{"words":{"items":{"type":"string"},"type":"array","title":"Words"}},"type":"object","required":["words"],"title":"RestrictedWordList","description":"Restricted Domain model"},"RestrictedWordUpdate":{"properties":{"add":{"anyOf":[{"$ref":"#/components/schemas/RestrictedWordList"},{"type":"null"}]},"remove":{"anyOf":[{"$ref":"#/components/schemas/RestrictedWordList"},{"type":"null"}]}},"type":"object","title":"RestrictedWordUpdate"},"RestrictionEntriesFields":{"type":"string","enum":["restriction_id","restriction_name","id","type","value","tld_name","password","is_registered","expiry_date","registration_date","registrant_email","active","can_register","added_date"],"title":"RestrictionEntriesFields","description":"This is the list of fields that we can sort and filter on."},"RestrictionFields":{"type":"string","enum":["id","name","reason","can_register","active","priority","prevents_publication","pre_verification","total_domain_entries","total_word_entries","total_regexp_entries","since_date","to_date","is_system"],"title":"RestrictionFields"},"StickyColumns":{"type":"string","enum":["tld_name","registrar_name","created_date","updated_date","domain_name","domain_roid","price","survives_transfer","type","validity_from","validity_to"],"title":"StickyColumns"},"StickyOperationType":{"type":"string","enum":["renew","transfer"],"title":"StickyOperationType"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"}},"type":"object","required":["access_token","token_type"],"title":"Token"},"TransferStatus":{"type":"string","enum":["serverApproved","serverCancelled"],"title":"TransferStatus"},"TransferStatusFilter":{"type":"string","enum":["pending","clientApproved","clientCancelled","clientRejected","serverApproved","serverCancelled"],"title":"TransferStatusFilter"},"UploadBatchFields":{"type":"string","enum":["id","batch_name","activation_date","is_active","activity_start_date","last_refresh","last_refresh_status","tld_name","is_promoted","batch_type","status"],"title":"UploadBatchFields","description":"List of fields returned by the /list endpoint"},"UserProfile":{"properties":{"id":{"type":"integer","title":"Id","description":"User ID"},"real_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Real Name","description":"User's full name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User's email address"},"username":{"type":"string","title":"Username","description":"Username"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"User roles as a list of strings"}},"type":"object","required":["id","username"],"title":"UserProfile","description":"User profile information from v_api_credential view."},"UserProfileResponse":{"properties":{"status":{"type":"integer","title":"Status"},"ok":{"type":"boolean","title":"Ok"},"msg":{"type":"string","title":"Msg"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserProfile"},{"type":"null"}]}},"type":"object","required":["status","ok","msg"],"title":"UserProfileResponse","description":"Response for GET /token/me (current user profile)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{"roles":"roles that the user is member of"},"tokenUrl":"token"}}}}}}