USPTO Filing Bot

API Documentation v1

System Overview & Lifecycle

This API powers a fully autonomous USPTO trademark filing bot. The end-to-end flow is:

API Call: Create Applicant │ ▼ ┌─────────────────────────────────────────────────────────┐ │ PHASE 1 — Account Creation (Automated by Bot) │ │ │ │ 1. PENDING ──────────────► 2. EMAIL_CREATED │ │ (API inserts row) (mailbox provisioned) │ │ │ │ 3. FORM_FILLING ─────────► 4. FORM_SUBMITTED │ │ (bot fills USPTO form) (form submitted) │ │ │ │ 5. EMAIL_VERIFICATION_PENDING ► 6. EMAIL_VERIFIED │ │ (waiting for email) (link clicked) │ │ │ │ 7. PASSWORD_SETUP ───────► 8. SECURITY_METHOD_SETUP │ │ (password set) (MFA enrolled) │ │ │ │ 9. ACCOUNT_CREATED 10. ACCOUNT_FAILED │ │ (success — ready) (error — terminal) │ └─────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────┐ │ PHASE 2 — ID.me Verification (Automated by Bot) │ │ │ │ Bot signs in, checks /tm/verify-identity │ │ On success: 11. IDME_VERIFIED │ └─────────────────────────────────────────────────────────┘ │ ▼ API Call: Create Filing (creates Application record) │ ▼ ┌─────────────────────────────────────────────────────────┐ │ PHASE 3 — Trademark Filing (Automated by Bot) │ │ │ │ Filing Status: │ │ 1. PENDING ──► 2. UNDER_PROCESS ──► 3. DONE │ │ └──► 4. ERROR │ │ │ │ Bot signs in using stored credentials + TOTP, │ │ drives the multi-page USPTO wizard automatically. │ └─────────────────────────────────────────────────────────┘

Key Concepts

Important Rules

⚠️ Before Filing
  1. Applicant must exist and be IDME_VERIFIED before filing.
  2. Only PENDING applications can be edited (via PUT).
  3. All codes are case-insensitive.
  4. Country/State accept ISO2 codes OR full names.

Response Envelope (All Endpoints)

// Success
{
  "IsSuccess": true,
  "Data": { ... },
  "Message": "Request completed successfully.",
  "StatusCode": 200
}

// Error
{
  "IsSuccess": false,
  "Data": { "errors": [ { "path": "...", "code": "...", "message": "..." } ] },
  "Message": "Validation failed",
  "StatusCode": 400
}

USPTO Wizard Pages

When the bot files a trademark, it drives a multi-page USPTO wizard. Each section of your API payload maps to one or more wizard pages.

Wizard Page Sequence

#USPTO Wizard PageAPI Section(s)Purpose
1Application Selectionapplication.typeCodeSelects "Standard" or "Less Common" type. Nearly all use "standard".
2Owner Informationowners[]Identifies who owns the trademark. Supports multiple owners (bot adds tabs).
3Attorney InformationattorneyAttorney of record. Skipped entirely when attorney = null.
4Correspondence InformationcorrespondenceWho receives official USPTO mail.
5Mark Selectionmark.formatCodeRadio: Standard Character, Special Form, Sound, or Motion.
6Standard Character (conditional)mark.textOnly for Standard Character Mark. Single text field.
7Stylized/Design Format (conditional)mark.stylizedMarkTypeCodeOnly for Special Form. Sub-type radio.
8Color Claimed (conditional)mark.colorClaimedOnly for Special Form. Yes/No color claim radio.
9Mark Drawing (conditional)mark.drawingFileFile upload. Bot handles color conversion panel auto.
10Mark Details (conditional)mark.description, mark.colorClaimAI-generated description accepted automatically.
11Translationmark.translations[]Non-English words. Empty = "No foreign words".
12Name/Likeness Consentmark.nameConsents[]Living person's name/portrait. Empty = "No".
13Goods & ServicesgoodsServices[]Nice Classification class + descriptions.
14Supporting Info (conditional)specimen, datesOnly for basis 1A. Specimen upload.
15Filing Basis SelectionfilingBasisCodeLegal basis: 1A, 1B, 44D, 44E, or 66A.
16Declaration & SignaturedeclarationE-signature + 4 acknowledgement checkboxes.
17Submit Overview(terminal)Bot saves as draft — does NOT live-submit.

Entity Type → USPTO Owner Form

entityTypeCodeUSPTO Form LabelIdentity FieldsSpecial Sections
individualIndividualfirstName, lastName, countryOfCitizenshipCode
sole_proprietorshipSole ProprietorshipentityName + firstName, lastName, countryOfCitizenshipCode
us_corporationCorporationentityName, stateOfIncorporationCodeCountry auto-set to US
us_llcLimited Liability CompanyentityName, stateOfIncorporationCodeCountry auto-set to US. Requires members[]
foreign_corporationCorporationentityName, countryOfIncorporationCode
foreign_llcLimited Liability CompanyentityName, countryOfIncorporationCodeRequires members[]
partnershipPartnershipentityNameRequires members[] with roleCode: "partner"
limited_partnershipLimited PartnershipentityName, stateOfIncorporationCodeCountry auto-set to US
trustTrustentityNameRequires members[] with roleCode: "trustee"
estateEstateentityNameRequires members[] with roleCode: "executor"
joint_venturePartnershipentityNameRequires members[]
governmentOtherentityNameCountry auto-set to US
otherNon-profit AssociationentityNameCountry auto-set to US
💡 Key Insight
sole_proprietorship is the only entity type that requires both entityName (business name) AND firstName/lastName (individual) plus countryOfCitizenshipCode.

Mark Format → Wizard Path

formatCodePages ShownRequired Fields
Standard Character MarkMark Selection → Standard Character → Translation → ...mark.text
Special FormMark Selection → Stylized → Color Claimed → Drawing → Details → ...mark.drawingFile, mark.stylizedMarkTypeCode, mark.description
Sound MarkMark Selection → Drawing (audio) → ...mark.soundFile
Motion MarkMark Selection → Drawing (video) → ...mark.motionFile

Filing Basis → Wizard Behavior

CodeNameWhat the Bot Fills
1AUse in CommercefirstUseAnywhereDate, firstUseInCommerceDate, specimen data
1BIntent to UseRadio only — no additional data
44DForeign ApplicationforeignApplication.countryCode, .serialNumber, .filingDate
44EForeign RegistrationforeignRegistration.countryCode, .registrationNumber, dates, certificate
66AMadrid ProtocolRadio only — no additional data

Address Rules

POST /applicants/create-applicant

Creates a new applicant and provisions a USPTO mailbox. The bot automatically picks up PENDING applicants and begins account creation.

POST /api/v1/applicants/create-applicant

Request Body

{
  "companyId": 1,
  "customerId": 1014,
  "nameTitle": "Mr",
  "firstName": "Mike",
  "middleName": null,
  "lastName": "Jacob",
  "suffix": null,
  "emailAddress": "[email protected]",
  "emailDomain": "trademarkluv.com",
  "country": "US",
  "state": "TX",
  "cityId": null,
  "streetAddress1": "411 Spruce St",
  "streetAddress2": null,
  "zipCode": "78701",
  "phone": {
    "dialCode": "1",
    "countryCode": "US",
    "number": "2179856987"
  }
}

Field Reference

FieldTypeRequiredValidationPurpose
companyIdintegerYespositive intTenant ID. Determines available email domains.
customerIdintegerYespositive intUsed as suffix in auto-generated USPTO email.
nameTitlestringNomax 50Salutation. Not used on USPTO form.
firstNamestringYes1–200 charsFilled into USPTO "Create Account" first name field.
middleNamestringNomax 200Filled into account form if present.
lastNamestringYes1–200 charsFilled into USPTO account last name field.
suffixstringNomax 20Stored for records. Not on USPTO form.
emailAddressstringYesvalid emailYour contact email. NOT the USPTO account email.
emailDomainstringYes1–250 charsDomain for auto-generated USPTO inbox. Must exist in AvailableDomains.
countrystringYes1–255 charsISO2 or full name. Used on USPTO account form.
statestringNomax 255ISO2 or full name. Only visible for US addresses.
cityIdintegerNopositive intCity ID from lookup. Stored for records.
streetAddress1stringYes1–500 charsFilled into USPTO account address field.
streetAddress2stringNomax 500Additional address line.
zipCodestringNomax 50Filled into USPTO ZIP code field.
phone.dialCodestringYesdigits only, 1–15Country code. No + prefix. Bot auto-prepends it.
phone.countryCodestringNomax 10ISO2 phone country. Sets flag on form.
phone.numberstringYesdigits only, 5–15Raw digits. No dashes/spaces/parentheses.

What Happens Internally

  1. Country/state codes resolved to database IDs.
  2. emailDomain validated against AvailableDomains table.
  3. Cryptographically strong USPTO-compliant password auto-generated (14 chars).
  4. Applicant inserted with PENDING (1) status.
  5. USPTO email mailbox provisioned: {firstname}.{lastname}{customerId}@{emailDomain}.
  6. Bot picks up on next cycle (every 10 seconds) and begins automation.

Success Response — 201 Created

{
  "IsSuccess": true,
  "Data": {
    "applicantId": 42,
    "usptoAccountEmail": "[email protected]",
    "lifecycleStatus": "PENDING"
  },
  "Message": "Applicant created successfully.",
  "StatusCode": 201
}

GET /applicants/:id/get-2fa-code

Returns the current live 6-digit TOTP code for an applicant's USPTO MFA account. The code is generated server-side from the MFASecret stored in the database using RFC 6238 (SHA-1, 30-second window) — identical to Google Authenticator output.

GET /api/v1/applicants/:id/get-2fa-code

URL Parameter

ParameterTypeDescription
idintegerApplicant primary-key ID

Success Response — 200 OK

{
  "IsSuccess": true,
  "Data": {
    "applicantId": 24,
    "usptoAccountEmail": "[email protected]",
    "totpCode": "482910",
    "generatedAt": "2026-06-06T00:00:00.000Z"
  },
  "Message": "Request completed successfully.",
  "StatusCode": 200
}

Response Fields

FieldTypeDescription
applicantIdintegerThe applicant's database ID
usptoAccountEmailstring | nullUSPTO mailbox provisioned for this applicant
totpCodestring (6 digits)Current TOTP code. Valid for up to 30 seconds from generatedAt.
generatedAtISO 8601 timestampUTC timestamp when the code was generated

Error Responses

HTTPWhen
404Applicant with given id does not exist or has been soft-deleted.
409Applicant exists but MFASecret is not set — TOTP enrollment in Phase 1 has not completed yet.
💡 Lifecycle Note
MFASecret is written to the database only after the bot completes the TOTP enrollment step in Phase 1 (Account Creation). If the applicant's lifecycle status is below ACCOUNT_CREATED (9), expect a 409 response.

POST /applications/create-complete-application

Creates a complete trademark filing in a single atomic transaction. All child entities are inserted together — if any part fails, nothing is saved.

POST /api/v1/applications/create-complete-application

Top-Level Fields

FieldTypeRequiredDescription
applicantIdintegerYesMust reference an existing, non-deleted applicant (ideally IDME_VERIFIED).
clientApplicationIdstringNoYour external reference ID. Stored but not used by the bot.
applicationobjectYes{ "typeCode": "standard" }
ownersarrayYesAt least 1 owner. See Owner Object below.
attorneyobject | nullNoSet null to file pro se (without attorney).
correspondenceobjectYesWho receives USPTO communications.
markobjectYesThe trademark itself.
goodsServicesarrayYesAt least 1 entry. Each represents one Nice Classification class.
declarationobjectYesSignatory declaration under penalty of perjury.

Owner Object

FieldTypeRequiredDescriptionPurpose on USPTO Form
ownerOrderintegerYesUnique sequential order (1, 2, 3...).Determines tab order on Owner page.
entityTypeCodestringYesSee Lookup Values.Controls which sub-form USPTO renders.
firstNamestringCondRequired for individual & sole_proprietorship.Fills "First name" field.
lastNamestringCondRequired for individual & sole_proprietorship.Fills "Last name" field.
countryOfCitizenshipCodestringCondRequired for individual & sole_proprietorship.Fills "Country of citizenship" dropdown. Must be filled first for individuals.
entityNamestringCondRequired for all non-individual types.Fills "Owner name" for juristic entities.
stateOfIncorporationCodestringNoFor US entities.Fills "State where legally organized" dropdown.
countryOfIncorporationCodestringNoFor foreign entities.Fills "Country where legally organized" dropdown.
domicileAddressYesPrincipal place of business.Fills Domicile Address section.
sameDomicileAndMailingbooleanYesIf true, mailing = domicile.Controls "same as mailing" checkbox.
mailingAddressAddressCondRequired when sameDomicileAndMailing = false.Fills Mailing Address section.
emailstringYesValid email address.Fills owner email field.
phonePhoneYesSee Phone Object.Fills phone + flag-picker.
websitestringNoOwner's website URL.Checks "add URL" checkbox, fills URL.
isAddressPublicbooleanNoShow domicile on public record.Controls TSDR visibility.
alternateNamestringNoDBA / alternate name.Fills alternate name text field.
alternateNameTypeCodestringNoRequired if alternateName set.Selects type: DBA, AKA, TA.
membersarrayCondRequired for: LLC, partnership, trust, estate.Fills trustee/executor/partner cards.

Address Object

FieldTypeRequiredPurpose
streetLine1stringYesFills "Address Line 1".
streetLine2stringNoFills "Address Line 2" (apt, suite).
citystringNoFills "City" text field.
statestringNoFills "State" dropdown. Only shown when country = "United States".
postalCodestringNoFills "Zip/Postal Code".
countrystringYesFills "Country" dropdown. Drives State visibility.

Phone Object

FieldTypeRequiredPurpose
dialCodestringYesDigits only, no +. Bot auto-prepends it. E.g. "1", "44".
numberstringYesDigits only. Fills "Primary telephone" input.
extensionstringNoFills "Extension" input.

Attorney Object

Set to null to file pro se (without attorney). The bot skips the Attorney page entirely.

FieldTypeRequiredPurpose
namestringYesFills "Attorney name" field.
firmNamestringNoFills "Firm name" field.
barStateCodestringNoFills "Bar membership state" dropdown.
barNumberstringNoFills "Bar number" field.
emailstringYesAttorney's email address.
phonePhoneYesAttorney's phone.
addressAddressYesAttorney's mailing address.

Correspondence Object

FieldTypeRequiredPurpose
namestringYesFills "Correspondence Name".
primaryEmailstringYesPrimary email for all USPTO communications.
secondaryEmailsstring[]NoCC emails for correspondence.
showPubliclybooleanNoIf true, email visible in TSDR.

Mark Object

FieldTypeRequiredPurpose on USPTO Form
formatCodestringYesSelects mark format radio. Determines subsequent pages.
textstringCondStandard Character: fills text input. Special Form: fills "literal text" if detected.
stylizedMarkTypeCodestringCondRequired for Special Form. Selects sub-type radio.
colorClaimedbooleanNoDrives Color Claimed page radio.
descriptionstringCondFallback for Mark Details. Bot first tries AI-generated description.
colorClaimstringNoFallback for color claim textarea.
disclaimerstringNoFills disclaimer on Additional Information page.
drawingFileFileRefCondRequired for Special Form. Uploaded to Mark Drawing page.
soundFileFileRefCondRequired for Sound Mark.
motionFileFileRefCondRequired for Motion Mark.
translationsarrayNoEach entry fills one translation row. Empty = "no foreign words".
nameConsentsarrayNoEach entry fills consent form. Empty = "no name/likeness".

File Reference Object

Two options for providing files:

// Option A: Reference existing uploaded file
{ "fileAssetId": 123 }

// Option B: URL for bot to download
{ "sourceUrl": "https://example.com/logo.png" }

Mark Cross-Field Validation

formatCodetextdrawingFilesoundFilemotionFilestylizedMarkTypeCodedescription
Standard Character MarkRequiredForbidden
Special FormRequiredRequiredRequired
Sound MarkRequired
Motion MarkRequired

Goods/Services Object

FieldTypeRequiredPurpose on USPTO Form
entryOrderintegerYesOrder entries are added on the page.
entryTypeCodestringYes"idManual": search by subclass code. "freeForm": custom text.
classNumberstringYes3-digit Nice class (e.g. "045", "009"). Zero-padded.
subClassCodestringCondRequired for idManual. Search term on ID Manual tab.
subClassTextsstring[]NoFills placeholder textareas in ID Manual entries.
freeFormTextstringCondRequired for freeForm. Typed into free-form textarea.
filingBasisCodestringYesSelects filing basis radio: 1A, 1B, 44D, 44E, 66A.
firstUseAnywhereDatestringCondMM/DD/YYYY. Required for 1A. "Date of first use anywhere".
firstUseInCommerceDatestringCondMM/DD/YYYY. Required for 1A. "Date of first use in commerce".
specimenobjectCondRequired for 1A. Proof of use (screenshot, label photo, etc.).
foreignApplicationobjectCondRequired for 44D. Country, serial number, filing date.
foreignRegistrationobjectCondRequired for 44E. Country, reg number, dates, certificate.

Goods/Services Cross-Field Validation

BasisfirstUseAnywhereDatefirstUseInCommerceDatespecimenforeignApplicationforeignRegistration
1AReqReqReq
1B
44DReq
44EReq
66A

Declaration Object

FieldTypeRequiredPurpose on USPTO Form
signatureMethodCodestringYesSelects signature method. Use "Electronic Signature".
signatoryNamestringYesFills "Signatory name". Declares under penalty of perjury.
signatoryTitlestringNoFills "Signatory title" (e.g. CEO, Trustee).
signatureTextstringYesE-signature: /FirstName LastName/ format.
signatureDatestringNoMM/DD/YYYY. USPTO auto-fills date — bot writes it back to DB.
acknowledgeBasisbooleanYesMust be true. "Entitled to use mark in commerce."
acknowledgeUniquenessbooleanYesMust be true. "No other person has right to use."
acknowledgeFactualContentsbooleanYesMust be true. "All statements are true."
acknowledgeWarningbooleanYesMust be true. "Willful false statements punishable."
⛔ All four acknowledge flags must be true
The request is rejected with ACKNOWLEDGEMENT_REQUIRED if any flag is false.

PUT /applications/create-complete-application/:appId

Atomically replaces an existing PENDING application. Deletes all child entities and re-inserts from the new payload.

PUT /api/v1/applications/create-complete-application/{appId}
AspectPOST (Create)PUT (Replace)
Creates new Application rowYesNo — reuses existing
Deletes child entities firstNoYes — atomic wipe + re-insert
Returns applicationIdNew IDSame appId from URL
Allowed statusAnyApplication must exist & not be deleted
Response code201200

Request body is identical to POST. The applicantId in the body is still required.

Lookup API Reference

GET /api/v1/lookup/{resource}
ResourceDescriptionHas Code Column
owner-entity-typesAll valid entity type codesYes
filing-basesFiling basis codes (1A, 1B, 44D, 44E, 66A)Yes
mark-formatsMark format titlesNo — use Title
stylized-mark-typesStylized mark sub-typesYes
goods-entry-typesidManual, freeFormYes
signature-methodsSignature method titlesNo — use Title
name-likeness-typesName, Portrait, SignatureYes
consent-proof-typesDeclaration, Written Consent, RegistrationYes
alternate-name-typesDBA, AKA, FKA, TAYes
owner-member-rolesMember, Manager, Partner, Trustee, Executor, BeneficiaryYes

Other Lookup Endpoints

GET /api/v1/lookup/countries
GET /api/v1/lookup/states?countryId=1
GET /api/v1/lookup/cities?stateId=44
GET /api/v1/lookup/domains?companyId=1
GET /api/v1/lookup/companies
GET /api/v1/lookup/uspto-classes
GET /api/v1/lookup/uspto-sub-classes?classCode=045

All Lookup Values

📌 Note
All codes are case-insensitive. "us_llc", "US_LLC", "Us_Llc" all work.

Application Types

CodeTitle
standardStandard

Owner Entity Types

CodeTitleRequired Fields
individualIndividualfirstName, lastName, countryOfCitizenshipCode
sole_proprietorshipSole ProprietorshipentityName + firstName, lastName, countryOfCitizenshipCode
us_corporationUS CorporationentityName
us_llcUS LLCentityName, members[]
foreign_corporationForeign CorporationentityName
foreign_llcForeign LLCentityName, members[]
partnershipPartnershipentityName, members[]
limited_partnershipLimited PartnershipentityName, stateOfIncorporationCode
joint_ventureJoint VentureentityName, members[]
trustTrustentityName, members[]
estateEstateentityName, members[]
governmentGovernmententityName
otherOtherentityName

Owner Member Roles

CodeTitleUsed With
memberMemberus_llc, foreign_llc
managerManagerus_llc, foreign_llc
partnerPartnerpartnership, joint_venture
trusteeTrusteetrust
executorExecutorestate
beneficiaryBeneficiarytrust, estate

Alternate Name Types

CodeTitle
dbaDBA (Doing Business As)
akaAKA (Also Known As)
fkaFKA (Formerly Known As)
taTA (Trading As)

Mark Formats

⚠️ No Code column — pass the Title value
Title (use as formatCode)Description
Standard Character MarkPlain text only. No logo, no stylization.
Special FormLogo, stylized text, or design. Requires drawing file.
Sound MarkAudio mark. Requires sound file.
Motion MarkVideo/animation mark. Requires motion file.

Stylized Mark Types

CodeTitle
design_onlyDesign Only
wording_onlyWording Only
wording_and_designWording and Design

Filing Basis

CodeTitleTrademark Act Section
1AUse in Commerce§1(a) — Mark is already in use
1BIntent to Use§1(b) — Bona fide intent to use
44DForeign Application§44(d) — Priority from foreign app
44EForeign Registration§44(e) — Based on foreign registration
66AMadrid Protocol§66(a) — International registration

Goods Entry Types

CodeTitleDescription
idManualID ManualSearch by subclass code from USPTO's Trademark ID Manual.
freeFormFree FormCustom description text (max 20,000 chars).

Signature Methods

Title (use as signatureMethodCode)
Electronic Signature
Handwritten Pen-and-Ink Signature

Name Likeness Types

CodeTitle
nameName
portraitPortrait
signatureSignature

Consent Proof Types

CodeTitle
declarationDeclaration
written_consentWritten Consent
registrationRegistration

Error Codes Reference

Schema Validation Errors (Zod — HTTP 400)

ScenarioExample Error
Missing required field"String must contain at least 1 character(s)"
Invalid email"Invalid email"
Invalid date format"Must be MM/DD/YYYY"
Invalid class number"Must be 3-digit class like '045'"
Invalid phone.dialCode"dialCode must contain digits only, no '+'"
Invalid phone.number"number must contain digits only"

Business Validation Errors (HTTP 400)

CodePath ExampleWhen
DUPLICATE_ORDERowners[1].ownerOrderTwo owners have the same ownerOrder.
REQUIREDowners[0].firstNameConditionally required field is missing.
FORBIDDENowners[0].entityNameField must be empty for this entity type.
ACKNOWLEDGEMENT_REQUIREDdeclarationOne or more acknowledge flags is false.
UNKNOWN_CODEowners[0].entityTypeCodeLookup code doesn't exist in DB.
UNKNOWN_FILE_ASSETmark.drawingFile.fileAssetIdFileAsset doesn't exist or is deleted.
UNKNOWN_DOMAINemailDomainDomain not found in AvailableDomains.

HTTP Status Codes

CodeMeaning
200Success (GET, PUT)
201Created (POST)
400Validation failed (schema or business rules)
404Resource not found
500Internal server error
502Upstream dependency failure

Complete Example Payloads

Example 1: Individual Owner, Standard Text Mark, 1A Basis

Scenario: An individual files a standard character trademark already in use.

{
  "applicantId": 42,
  "clientApplicationId": "CLIENT-REF-001",
  "application": { "typeCode": "standard" },
  "owners": [
    {
      "ownerOrder": 1,
      "entityTypeCode": "individual",
      "firstName": "Mike",
      "lastName": "Jacob",
      "countryOfCitizenshipCode": "US",
      "domicile": {
        "streetLine1": "411 Spruce St",
        "city": "San Francisco",
        "state": "CA",
        "postalCode": "94102",
        "country": "United States"
      },
      "sameDomicileAndMailing": true,
      "noPhysicalLocation": false,
      "email": "[email protected]",
      "phone": { "dialCode": "1", "number": "2179856987" }
    }
  ],
  "attorney": null,
  "correspondence": {
    "name": "Mike Jacob",
    "primaryEmail": "[email protected]"
  },
  "mark": {
    "formatCode": "Standard Character Mark",
    "text": "NEXOCRAFT",
    "description": "The mark consists of standard characters NEXOCRAFT."
  },
  "goodsServices": [
    {
      "entryOrder": 1,
      "entryTypeCode": "idManual",
      "classNumber": "045",
      "subClassCode": "045-2381",
      "filingBasisCode": "1A",
      "firstUseAnywhereDate": "01/15/2023",
      "firstUseInCommerceDate": "03/01/2023",
      "specimen": {
        "description": "Screenshot of homepage showing the mark in use.",
        "webUrl": "https://techbrand.com",
        "accessDate": "2024-01-15",
        "file": { "sourceUrl": "https://example.com/specimen.jpg" }
      }
    }
  ],
  "declaration": {
    "signatureMethodCode": "Electronic Signature",
    "signatoryName": "Mike Jacob",
    "signatureText": "/Mike Jacob/",
    "acknowledgeBasis": true,
    "acknowledgeUniqueness": true,
    "acknowledgeFactualContents": true,
    "acknowledgeWarning": true
  }
}

Example 2: US LLC with Attorney, Logo Mark, Intent to Use

Scenario: A US LLC with members files a color logo with an attorney.

{
  "applicantId": 42,
  "application": { "typeCode": "standard" },
  "owners": [
    {
      "ownerOrder": 1,
      "entityTypeCode": "us_llc",
      "entityName": "TechBrand LLC",
      "stateOfIncorporationCode": "DE",
      "domicile": {
        "streetLine1": "123 Innovation Drive",
        "city": "Austin",
        "state": "Texas",
        "postalCode": "78701",
        "country": "US"
      },
      "sameDomicileAndMailing": true,
      "email": "[email protected]",
      "phone": { "dialCode": "1", "number": "5125550101" },
      "website": "https://techbrand.com",
      "members": [
        { "roleCode": "member", "name": "John Carter", "entityType": "individual", "countryCode": "US" },
        { "roleCode": "manager", "name": "Jane Doe", "entityType": "individual", "countryCode": "US" }
      ]
    }
  ],
  "attorney": {
    "name": "Jane Smith",
    "firmName": "Smith IP Law PLLC",
    "barStateCode": "TX",
    "barNumber": "TX-24098765",
    "email": "[email protected]",
    "phone": { "dialCode": "1", "number": "5125559988" },
    "address": {
      "streetLine1": "500 Congress Ave",
      "city": "Austin",
      "state": "TX",
      "postalCode": "78701",
      "country": "US"
    }
  },
  "correspondence": {
    "name": "Jane Smith",
    "primaryEmail": "[email protected]",
    "secondaryEmails": ["[email protected]"]
  },
  "mark": {
    "formatCode": "Special Form",
    "text": "TECHBRAND",
    "stylizedMarkTypeCode": "Wording and Design",
    "colorClaimed": true,
    "description": "The mark consists of TECHBRAND in stylized blue text with a gear icon.",
    "colorClaim": "The color blue is claimed as a feature of the mark.",
    "drawingFile": { "sourceUrl": "https://example.com/logo.png" }
  },
  "goodsServices": [
    {
      "entryOrder": 1,
      "entryTypeCode": "freeForm",
      "classNumber": "042",
      "freeFormText": "Software as a service (SaaS) featuring platforms for business automation",
      "filingBasisCode": "1B"
    }
  ],
  "declaration": {
    "signatureMethodCode": "Electronic Signature",
    "signatoryName": "John Carter",
    "signatoryTitle": "CEO",
    "signatureText": "/John Carter/",
    "acknowledgeBasis": true,
    "acknowledgeUniqueness": true,
    "acknowledgeFactualContents": true,
    "acknowledgeWarning": true
  }
}

Example 3: Trust with Translations & Name Consent

Scenario: A trust with trustees files a color logo containing a foreign word and a living person's name.

{
  "applicantId": 42,
  "application": { "typeCode": "standard" },
  "owners": [
    {
      "ownerOrder": 1,
      "entityTypeCode": "trust",
      "entityName": "Carter Family Trust",
      "domicile": {
        "streetLine1": "500 Park Ave",
        "city": "New York",
        "state": "NY",
        "postalCode": "10022",
        "country": "United States"
      },
      "sameDomicileAndMailing": false,
      "mailingAddress": {
        "streetLine1": "PO Box 5500",
        "city": "New York",
        "state": "NY",
        "postalCode": "10022",
        "country": "US"
      },
      "email": "[email protected]",
      "phone": { "dialCode": "1", "number": "2125550300" },
      "members": [
        { "roleCode": "trustee", "name": "John Carter", "entityType": "individual", "countryCode": "US" },
        { "roleCode": "trustee", "name": "Sarah Carter", "entityType": "individual", "countryCode": "US" }
      ]
    }
  ],
  "attorney": null,
  "correspondence": {
    "name": "John Carter",
    "primaryEmail": "[email protected]"
  },
  "mark": {
    "formatCode": "Special Form",
    "text": "CASA CARTER",
    "stylizedMarkTypeCode": "Wording and Design",
    "colorClaimed": true,
    "description": "The mark consists of CASA CARTER in stylized gold script over a shield design.",
    "colorClaim": "The colors gold and navy blue are claimed as features of the mark.",
    "drawingFile": { "sourceUrl": "https://example.com/casa-carter-logo.png" },
    "translations": [
      {
        "isNonLatinPhrase": false,
        "nonEnglishWord": "Casa",
        "language": "Spanish",
        "hasEnglishMeaning": true,
        "englishTranslation": "House"
      }
    ],
    "nameConsents": [
      {
        "likenessTypeCode": "name",
        "legalName": "John Carter",
        "isSignatory": true,
        "consentToRegister": true,
        "proofTypeCode": "declaration"
      }
    ]
  },
  "goodsServices": [
    {
      "entryOrder": 1,
      "entryTypeCode": "idManual",
      "classNumber": "025",
      "subClassCode": "025-0100",
      "filingBasisCode": "1B"
    }
  ],
  "declaration": {
    "signatureMethodCode": "Electronic Signature",
    "signatoryName": "John Carter",
    "signatoryTitle": "Trustee",
    "signatureText": "/John Carter/",
    "acknowledgeBasis": true,
    "acknowledgeUniqueness": true,
    "acknowledgeFactualContents": true,
    "acknowledgeWarning": true
  }
}

Fetching USPTO Classes

GET /api/v1/lookup/uspto-classes
→ [
    { "Id": 1, "ClassCode": "001", "ClassTitle": "Chemicals", "ClassType": "Goods" },
    { "Id": 9, "ClassCode": "009", "ClassTitle": "Electrical and Scientific Apparatus", "ClassType": "Goods" },
    { "Id": 42, "ClassCode": "042", "ClassTitle": "Computer & Scientific & Legal", "ClassType": "Services" },
    { "Id": 45, "ClassCode": "045", "ClassTitle": "Personal & Legal & Social", "ClassType": "Services" }
  ]

GET /api/v1/lookup/uspto-sub-classes?classCode=045
→ [
    { "Id": 100, "SubClassCode": "045-2381", "ClassCode": "045", "SubClassTitle": "Online social networking..." },
    { "Id": 101, "SubClassCode": "045-2380", "ClassCode": "045", "SubClassTitle": "Social introduction..." }
  ]

Date Format Summary

ContextFormatExample
firstUseAnywhereDateMM/DD/YYYY"01/15/2023"
firstUseInCommerceDateMM/DD/YYYY"03/01/2023"
signatureDateMM/DD/YYYY"06/03/2026"
foreignApplication.filingDateYYYY-MM-DD"2023-06-15"
foreignRegistration.registrationDateYYYY-MM-DD"2023-09-01"
foreignRegistration.expirationDateYYYY-MM-DD"2033-09-01"
specimen.accessDateYYYY-MM-DD"2024-01-15"
📅 Date Format Rule
Domestic dates use MM/DD/YYYY (USPTO format). Foreign dates use YYYY-MM-DD (ISO).

Bot Automation Details

Filing Data Pipeline

Your API Call (POST /create-complete-application) │ ▼ ┌─────────────────────────────────────────────────┐ │ 1. Zod Schema Validation │ │ → masterFilingSchema validates structure │ │ → Cross-field rules (entity type, basis, etc.)│ ├─────────────────────────────────────────────────┤ │ 2. Business Validation │ │ → Resolve all codes to DB IDs │ │ → Validate file assets exist │ │ → Check acknowledgement flags │ ├─────────────────────────────────────────────────┤ │ 3. MSSQL Transaction (atomic insert) │ │ → Application + Owners + Attorney + │ │ Correspondence + Mark + Goods + Declaration │ ├─────────────────────────────────────────────────┤ │ 4. Filing Status = PENDING │ │ → Queued for bot pickup │ └─────────────────────────────────────────────────┘ │ (bot picks up on next cycle — every 10s) ▼ ┌─────────────────────────────────────────────────┐ │ 5. Filing Data Assembly │ │ → DB → IRawFilingPayload → IFilingFormData │ ├─────────────────────────────────────────────────┤ │ 6. USPTO Wizard Automation │ │ → Signs in with stored credentials + TOTP │ │ → Navigates wizard (max 50 page visits) │ │ → Fills each page declaratively │ ├─────────────────────────────────────────────────┤ │ 7. Outcome │ │ → Success: Status = DONE + webhook │ │ → Error: Status = ERROR + webhook │ └─────────────────────────────────────────────────┘

Bot Behavior Highlights

Webhook Callbacks

EventWhen
APPLICANT_STATUS_CHANGEDAny lifecycle status transition.
ACCOUNT_FAILEDAccount creation failed (terminal).
IDME_VERIFIEDID.me verification completed — ready for filing.
FILING_STATUS_CHANGEDFiling status changes (PENDING → UNDER_PROCESS → DONE/ERROR).
SUBMISSION_COMPLETEDFiling saved as draft successfully.
SUBMISSION_FAILEDFiling failed with error.

Callbacks are delivered with retry logic (configurable per company). Failed deliveries use linear backoff up to a configurable maximum.

WebSocket — Live TOTP Authenticator

The server exposes a WebSocket endpoint that pushes the current live TOTP codes for all enrolled applicants every 10 seconds (configurable via AUTHENTICATOR_REFRESH_INTERVAL_MS env var). No polling required — just connect and listen.

WS /api/authenticator

Connect & Listen

const ws = new WebSocket("https://filingbot.crmbytes.com/api/authenticator");

ws.onopen = () => console.log("Connected");

ws.onmessage = (e) => {
  const snapshot = JSON.parse(e.data);
  console.log(snapshot);
};

ws.onclose = () => console.log("Disconnected");
ws.onerror = (err) => console.error("WS error", err);

Behavior on Connect

⚡ Immediate First Message
Upon connecting, the server immediately sends the last known snapshot so the client doesn’t have to wait up to 10 seconds for the first broadcast. After that, a fresh snapshot is pushed every AUTHENTICATOR_REFRESH_INTERVAL_MS (default 10s).

Message Shape (IAuthenticatorSnapshot)

{
  "capturedAt": "2026-06-06T00:00:00.000Z",
  "entries": [
    {
      "issuer": "[email protected]",
      "account": "Applicant #24",
      "code": "482910"
    },
    {
      "issuer": "[email protected]",
      "account": "Applicant #42",
      "code": "719034"
    }
  ]
}

Field Reference

FieldTypeDescription
capturedAtISO 8601 stringUTC timestamp when this snapshot was generated
entriesarrayOne entry per enrolled applicant. Empty array if no applicants have an MFASecret yet.
entries[].issuerstringThe applicant’s USPTO account email (USPTOAccountEmail)
entries[].accountstringHuman-readable label e.g. "Applicant #24"
entries[].codestring (6 digits)Current live TOTP code. Valid for the remainder of the current 30-second window.

Key Points