API Reference
Calls
Access call history and SIM info. Requires READ_CALL_LOG permission.
Type Definitions
bash
type Call {
id: ID!
number: String!
name: String! # display name from contacts
photoId: String! # use GET /fs?id=<photoId>
startedAt: String! # ISO 8601
duration: Int! # seconds
type: Int! # 1=incoming 2=outgoing 3=missed 4=voicemail 5=rejected 6=blocked
accountId: String! # SIM slot / account id
geo: String! # geographic label for the number
}
type Sim {
id: String!
label: String!
number: String!
subscriptionId: Int!
}Operations
query
calls
Search call log entries. Leave query empty to list all.
bash
query GetCalls($offset: Int!, $limit: Int!, $query: String!) {
calls(offset: $offset, limit: $limit, query: $query) {
id number name photoId startedAt duration type accountId geo
}
}query
callCount
Count calls matching a query.
bash
query GetCallCount($query: String!) {
callCount(query: $query)
}query
sims
List all SIM cards / phone accounts available on the device.
bash
query GetSims {
sims { id label number subscriptionId }
}mutation
call
Initiate a phone call to the given number. Set showDialer to true to open the phone app dialer instead of calling immediately. Requires CALL_PHONE permission.
bash
mutation Call($number: String!, $showDialer: Boolean!) {
call(number: $number, showDialer: $showDialer)
}mutation
deleteCalls
Delete call log entries matching a query.
bash
mutation DeleteCalls($query: String!) {
deleteCalls(query: $query)
}