Reference

Tech Providers

Provision client orgs, the fan-out webhook and the usage rollup

PARTNER_ADMIN only means something on an org of kind TECH_PROVIDER. See Client orgs.

clientOrgs

Query

ScopePARTNER_ADMIN

Returns

_idString!
nameString!
slugString!
partnerOfString
partnerRelationPartnerRelation
externalIdString
tenantConnectionTenantConnectionStatus
Last known health of the dedicated database/Redis; null when the org uses shared infra
query {
  clientOrgs { _id name slug partnerOf partnerRelation }
}

clientOrgsPage

Query

ScopePARTNER_ADMIN

GetCursorPaginatedInput

cursorString
limitInt
beforeBoolean

ClientOrgsFilterInput

searchString

Returns

nextCursorString
hasNextBoolean!
totalCountInt
Total matching client orgs (only on first page)
query {
  clientOrgsPage(pagination: { … }, filter: { … }) { data nextCursor hasNext totalCount }
}

partnerApiKeyAudit

Query

ScopePARTNER_ADMIN

GetCursorPaginatedInput

cursorString
limitInt
beforeBoolean

ApiKeyAuditFilterInput

keyIdString
fromDateTime
Inclusive lower bound
toDateTime
Exclusive upper bound

Returns

nextCursorString
hasNextBoolean!
totalCountInt
Total matching events (only on first page)
query {
  partnerApiKeyAudit(pagination: { … }, filter: { … }) { data nextCursor hasNext totalCount }
}

createClientOrg

Mutation

ScopePARTNER_ADMIN

Arguments

CreateClientOrgInput

nameString!Required
slugString
externalIdString
tenantDbUriString
tenantRedisUrlString

Returns

_idString!
nameString!
slugString!
partnerOfString
partnerRelationPartnerRelation
externalIdString
tenantConnectionTenantConnectionStatus
Last known health of the dedicated database/Redis; null when the org uses shared infra
mutation {
  createClientOrg(input: { … }) { _id name slug partnerOf partnerRelation }
}

createClientOrgWithWebhook

Mutation

ScopePARTNER_ADMIN

Create a managed client org and a webhook subscription bound to it. The signing secret is returned only in this response. If the webhook step fails after the org exists, the org is kept: call registerPartnerWebhook with organisationIds [childId] to recover.

Arguments

CreateClientOrgInput

nameString!Required
slugString
externalIdString
tenantDbUriString
tenantRedisUrlString

ClientOrgWebhookInput

urlString!Required
mutation {
  createClientOrgWithWebhook(input: { … }, webhook: { … }) { organisation webhook }
}

deletePartnerWebhook

Mutationirreversible

ScopePARTNER_ADMIN

Arguments

idID!Required

Returns

Boolean!
mutation {
  deletePartnerWebhook(id: "…")
}

deprovisionClientOrg

Mutationirreversible

ScopePARTNER_ADMIN

Arguments

orgIdString!Required

Returns

successBoolean!
organisationIdString!
errors[String!]!
durationInt!
Duration in milliseconds
mutation {
  deprovisionClientOrg(orgId: "…") { success organisationId deletedCounts errors duration }
}

partnerChildUsagePage

Query

ScopePARTNER_ADMIN

GetCursorPaginatedInput

cursorString
limitInt
beforeBoolean

TechProviderUsageFilterInput

monthsInt
searchString

Returns

nextCursorString
hasNextBoolean!
totalCountInt
Total matching client orgs (only on first page)
query {
  partnerChildUsagePage(pagination: { … }, filter: { … }) { data nextCursor hasNext totalCount }
}

partnerUsageAllTime

Query

ScopePARTNER_ADMIN

Returns

opsUsedFloat!
Ops used across all historical billing periods plus the live current period.
aiUsedFloat!
AI units used across all historical billing periods plus the live current period (may be fractional).
estimatedAmountCentsInt!
ESTIMATE only: all-time usage x the CURRENT contract rates (gross; ignores included allowances and the monthly minimum). There is no per-charge money log, so past rate changes are not reflected.
query {
  partnerUsageAllTime { opsUsed aiUsed estimatedAmountCents }
}

partnerUsageHistory

Query

ScopePARTNER_ADMIN

TechProviderUsageFilterInput

monthsInt
searchString

Returns

periodEndDateTime!
opsUsedFloat!
aiUsedFloat!
childrenInt!
estimatedAmountCentsInt!
query {
  partnerUsageHistory(filter: { … }) { periodEnd opsUsed aiUsed children estimatedAmountCents }
}

partnerUsageSummary

Query

ScopePARTNER_ADMIN

Returns

childrenInt!
opsUnitsInt!
aiUnitsInt!
estimatedAmountCentsInt!
currencyString!
opsAllowanceRemainingFloat!
aiAllowanceRemainingFloat!
currentPeriodStartDateTime!
currentPeriodEndDateTime!
query {
  partnerUsageSummary { children opsUnits aiUnits estimatedAmountCents currency }
}

partnerWebhookDeliveries

Query

ScopePARTNER_ADMIN

Arguments

subscriptionIdID!Required
beforeDateTime
limitInt
pageInt

Returns

totalInt!
nextCursorDateTime
hasMoreBoolean!
query {
  partnerWebhookDeliveries(subscriptionId: "…", status: PENDING, before: { … }, limit: 0, page: 0) { items total nextCursor hasMore }
}

partnerWebhooks

Query

ScopePARTNER_ADMIN

Returns

idID!
urlString!
organisationIds[ID!]!
previousSecretExpiresAtDateTime
createdAtDateTime
updatedAtDateTime
query {
  partnerWebhooks { id url subscribedEvents organisationIds status }
}

registerPartnerWebhook

Mutation

ScopePARTNER_ADMIN

Arguments

urlString!Required
organisationIds[ID!]

Returns

idID!
signingSecretString!
mutation {
  registerPartnerWebhook(url: "…", events: […], organisationIds: "…") { id signingSecret }
}

setPartnerWebhookOrganisations

Mutation

ScopePARTNER_ADMIN

Re-target a subscription to specific managed children. The list must be non-empty; to widen to all children, register a new subscription without organisationIds.

Arguments

idID!Required
organisationIds[ID!]!Required

Returns

idID!
urlString!
organisationIds[ID!]!
previousSecretExpiresAtDateTime
createdAtDateTime
updatedAtDateTime
mutation {
  setPartnerWebhookOrganisations(id: "…", organisationIds: "…") { id url subscribedEvents organisationIds status }
}

rotatePartnerWebhookSecret

Mutation

ScopePARTNER_ADMIN

Arguments

idID!Required
revokePreviousBoolean
Defaults to false.

Returns

signingSecretString!
previousSecretExpiresAtDateTime
mutation {
  rotatePartnerWebhookSecret(id: "…", revokePrevious: false) { signingSecret previousSecretExpiresAt }
}

setPartnerWebhookEvents

Mutation

ScopePARTNER_ADMIN

Arguments

idID!Required

Returns

idID!
urlString!
organisationIds[ID!]!
previousSecretExpiresAtDateTime
createdAtDateTime
updatedAtDateTime
mutation {
  setPartnerWebhookEvents(id: "…", events: […]) { id url subscribedEvents organisationIds status }
}

setPartnerWebhookStatus

Mutation

ScopePARTNER_ADMIN

Arguments

idID!Required
statusPartnerWebhookStatus!Required

Returns

idID!
urlString!
organisationIds[ID!]!
previousSecretExpiresAtDateTime
createdAtDateTime
updatedAtDateTime
mutation {
  setPartnerWebhookStatus(id: "…", status: ACTIVE) { id url subscribedEvents organisationIds status }
}

Was this page helpful?

On this page