<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.2.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>139</ContextCount>
  <ElementCount>221</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>39</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Condensed Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedBalanceSheets</Role>
      <ShortName>Condensed Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Condensed Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Condensed Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedStatementsOfOperations</Role>
      <ShortName>Condensed Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - Condensed Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedStatementsOfCashFlows</Role>
      <ShortName>Condensed Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - Condensed Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedStatementsOfStockholdersEquity</Role>
      <ShortName>Condensed Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00405 - Statement - Condensed Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/StatementCondensedStatementsOfStockholdersEquityParenthetical</Role>
      <ShortName>Condensed Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureOrganization</Role>
      <ShortName>Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Supplemental financial information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformation</Role>
      <ShortName>Supplemental financial information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Research collaboration agreement with Allergan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureResearchCollaborationAgreementWithAllergan</Role>
      <ShortName>Research collaboration agreement with Allergan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Fair value measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair value measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Property and equipment, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosurePropertyAndEquipmentNet</Role>
      <ShortName>Property and equipment, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureDebt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Stock incentive plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureStockIncentivePlans</Role>
      <ShortName>Stock incentive plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Warrants and derivative liability</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiability</Role>
      <ShortName>Warrants and derivative liability</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Net loss per share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureNetLossPerShare</Role>
      <ShortName>Net loss per share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>11201 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>20202 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Supplemental financial information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformationTables</Role>
      <ShortName>Supplemental financial information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformation</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Fair value measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair value measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Property and equipment, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosurePropertyAndEquipmentNetTables</Role>
      <ShortName>Property and equipment, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosurePropertyAndEquipmentNet</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureDebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureDebt</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Stock incentive plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureStockIncentivePlansTables</Role>
      <ShortName>Stock incentive plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureStockIncentivePlans</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>30903 - Disclosure - Warrants and derivative liability (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiabilityTables</Role>
      <ShortName>Warrants and derivative liability (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiability</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>31003 - Disclosure - Net loss per share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureNetLossPerShareTables</Role>
      <ShortName>Net loss per share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureNetLossPerShare</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Organization (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureOrganizationDetails</Role>
      <ShortName>Organization (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureOrganization</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Summary of significant accounting policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSummaryOfSignificantAccountingPoliciesDetails</Role>
      <ShortName>Summary of significant accounting policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Supplemental financial information - Cash, cash equivalents and restricted cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformationCashCashEquivalentsAndRestrictedCashDetails</Role>
      <ShortName>Supplemental financial information - Cash, cash equivalents and restricted cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Supplemental financial information - Prepaid expenses and other current assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformationPrepaidExpensesAndOtherCurrentAssetsDetails</Role>
      <ShortName>Supplemental financial information - Prepaid expenses and other current assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40303 - Disclosure - Supplemental financial information - Accrued expenses and other current liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureSupplementalFinancialInformationAccruedExpensesAndOtherCurrentLiabilitiesDetails</Role>
      <ShortName>Supplemental financial information - Accrued expenses and other current liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Research collaboration agreement with Allergan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureResearchCollaborationAgreementWithAllerganDetails</Role>
      <ShortName>Research collaboration agreement with Allergan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureResearchCollaborationAgreementWithAllergan</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Fair value measurements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureFairValueMeasurementsDetails</Role>
      <ShortName>Fair value measurements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Property and equipment, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosurePropertyAndEquipmentNetDetails</Role>
      <ShortName>Property and equipment, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosurePropertyAndEquipmentNetTables</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureDebtDetails</Role>
      <ShortName>Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureDebtTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Debt - Future Principal Debt Payments on The Loan Payable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureDebtFuturePrincipalDebtPaymentsOnLoanPayableDetails</Role>
      <ShortName>Debt - Future Principal Debt Payments on The Loan Payable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Stock incentive plans - Stock-based compensation expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureStockIncentivePlansStockBasedCompensationExpenseDetails</Role>
      <ShortName>Stock incentive plans - Stock-based compensation expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Stock incentive plans - Activity related to stock options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureStockIncentivePlansActivityRelatedToStockOptionsDetails</Role>
      <ShortName>Stock incentive plans - Activity related to stock options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40803 - Disclosure - Stock incentive plans - Restricted stock units (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureStockIncentivePlansRestrictedStockUnitsDetails</Role>
      <ShortName>Stock incentive plans - Restricted stock units (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Warrants and derivative liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiabilityDetails</Role>
      <ShortName>Warrants and derivative liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiabilityTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40902 - Disclosure - Warrants and derivative liability - Reconciliation of company's additional warrants (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureWarrantsAndDerivativeLiabilityReconciliationOfCompanySAdditionalWarrantsDetails</Role>
      <ShortName>Warrants and derivative liability - Reconciliation of company's additional warrants (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Net loss per share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureNetLossPerShareDetails</Role>
      <ShortName>Net loss per share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureNetLossPerShareTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>41002 - Disclosure - Net loss per share - Anti-dilutive securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureNetLossPerShareAntiDilutiveSecuritiesDetails</Role>
      <ShortName>Net loss per share - Anti-dilutive securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="aptx-20220930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>41201 - Disclosure - Commitments and contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.aptinyx.com/role/DisclosureCommitmentsAndContingenciesDetails</Role>
      <ShortName>Commitments and contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.aptinyx.com/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>45</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 21 fact(s) appearing in ix:hidden were eligible for transformation: us-gaap:CommonStockSharesOutstanding, us-gaap:DebtInstrumentTerm, us-gaap:EarningsPerShareDiluted, us-gaap:PreferredStockSharesOutstanding, us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding -  aptx-20220930x10q.htm 9</Log>
    <Log type="Warning">[ix-0514-Hidden-Fact-Not-Referenced] WARN: 5 fact(s) appearing in ix:hidden were not referenced by any -sec-ix-hidden style property: us-gaap:CommitmentsAndContingencies, us-gaap:RevenueFromContractWithCustomerProductAndServiceExtensibleList -  aptx-20220930x10q.htm 9</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-Q" original="aptx-20220930x10q.htm">aptx-20220930x10q.htm</File>
    <File>aptx-20220930.xsd</File>
    <File>aptx-20220930_cal.xml</File>
    <File>aptx-20220930_def.xml</File>
    <File>aptx-20220930_lab.xml</File>
    <File>aptx-20220930_pre.xml</File>
    <File>aptx-20220930xex31d1.htm</File>
    <File>aptx-20220930xex31d2.htm</File>
    <File>aptx-20220930xex32d1.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>aptx-20220930x10q001.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="431">http://fasb.org/us-gaap/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy items="31">http://xbrl.sec.gov/dei/2021q4</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
