Skip to main content

Developers

API Reference

Build integrations, plugins, and automations with the MotifLoom API.

Coming soon

We're building a public REST API with personal access tokens, rate limiting, and full CRUD for motifs, nodes, and edges. It will support integrations like browser extensions, Zapier, and custom apps.

In the meantime, MotifLoom uses GraphQL internally. If you're self-hosting, you can query it directly at /api/graphql.

GraphQL schema preview

Current internal API (subject to change). Available at POST /api/graphql with JWT Bearer token.

type Query {
  me: User
  motif(slug: String!): Motif
  myMotifs: [Motif!]!
  exploreMotifs(limit: Int): [Motif!]!
  searchMotifs(query: String!): [Motif!]!
  aiSuggestions(motifId: ID!): [Suggestion!]!
  notifications(limit: Int): [Notification!]!
}

type Mutation {
  createMotif(input: CreateMotifInput!): ...
  addNode(input: AddNodeInput!): ...
  addEdge(input: AddEdgeInput!): ...
  forkMotif(input: ForkMotifInput!): ...
  saveMotif(input: SaveMotifInput!): ...
  addComment(input: AddCommentInput!): ...
}